Commits

Anonymous committed aab728c

some code layout changes

  • Participants
  • Parent commits 2789564

Comments (0)

Files changed (1)

File newsmeme/views/frontend.py

 @keep_login_url
 def index(page=1):
     
-    page_obj = Post.query.popular().hottest().\
-        restricted(g.user).as_list().\
-        paginate(page, per_page=Post.PER_PAGE)
+    page_obj = \
+            Post.query.popular().hottest().\
+                restricted(g.user).as_list().\
+                paginate(page, per_page=Post.PER_PAGE)
         
     page_url = lambda page: url_for("frontend.index", page=page)
 
 @keep_login_url
 def latest(page=1):
     
-    page_obj = Post.query.popular().restricted(g.user).as_list().\
-        paginate(page, per_page=Post.PER_PAGE)
+    page_obj = \
+            Post.query.popular().restricted(g.user).as_list().\
+                paginate(page, per_page=Post.PER_PAGE)
 
     page_url = lambda page: url_for("frontend.latest", page=page)
 
 @cached()
 @keep_login_url
 def deadpool(page=1):
-    page_obj = Post.query.deadpooled().restricted(g.user).as_list().\
-        paginate(page, per_page=Post.PER_PAGE)
+    page_obj = \
+            Post.query.deadpooled().restricted(g.user).as_list().\
+                paginate(page, per_page=Post.PER_PAGE)
 
     page_url = lambda page: url_for("frontend.deadpool", page=page)
 
     if not keywords:
         return redirect(url_for("frontend.index"))
 
-    page_obj = Post.query.search(keywords).restricted(g.user).\
-            as_list().paginate(page, per_page=Post.PER_PAGE)
+    page_obj = \
+            Post.query.search(keywords).restricted(g.user).\
+                as_list().paginate(page, per_page=Post.PER_PAGE)
 
     if page_obj.total == 1:
 
     tag = Tag.query.filter_by(slug=slug).first_or_404()
 
     page_obj = tag.posts.restricted(g.user).as_list().\
-        paginate(page, per_page=Post.PER_PAGE)
+                    paginate(page, per_page=Post.PER_PAGE)
 
     page_url = lambda page: url_for('frontend.tag',
                                     slug=slug,