Skip to content

Instantly share code, notes, and snippets.

@nloadholtes
Created September 2, 2015 11:54
Show Gist options
  • Save nloadholtes/cde237edf8038bac4cc4 to your computer and use it in GitHub Desktop.
Save nloadholtes/cde237edf8038bac4cc4 to your computer and use it in GitHub Desktop.
Shows = mongoengine.Document()
Movies = mongoengine.Document()
Recommendations = mongoengine.Document()
def front_page(self):
print("1 - %s" % datetime.now())
tv_shows = Show.objects.get(genre="comedy")
print("2 - %s" % datetime.now())
movies = Movie.objets.get(genre="comedy")
print("3 - %s" % datetime.now())
recommendations = Recommendations.objects.get(user_id=current_user)
print("4 - %s" % datetime.now())
output = render_template("template/front_page.html",
tv_shows,
movies)
print("5 - %s" % datetime.now())
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment