Commits

Anonymous committed cce408c

current>popular

Comments (0)

Files changed (2)

newsmeme/models.py

     def deadpooled(self):
         return self.filter(Post.score <= 0)
 
-    def current(self):
+    def popular(self):
         return self.filter(Post.score > 0)
     
     def hottest(self):

newsmeme/views/frontend.py

 @keep_login_url
 def index(page=1):
     
-    page_obj = Post.query.current().hottest().\
+    page_obj = Post.query.popular().hottest().\
         restricted(g.user).as_list().\
         paginate(page, per_page=PER_PAGE)
         
 @keep_login_url
 def latest(page=1):
     
-    page_obj = Post.query.current().restricted(g.user).as_list().\
+    page_obj = Post.query.popular().restricted(g.user).as_list().\
         paginate(page, per_page=PER_PAGE)
 
     page_url = lambda page: url_for("frontend.latest", page=page)