Permalink
Browse files

added sticky to forum threads

  • Loading branch information...
1 parent 81fc5cc commit 2c4395ba4885ae160bda2062699595deff652452 @brosner brosner committed Dec 17, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 agora/models.py
  2. +1 −1 agora/views.py
View
@@ -278,7 +278,7 @@ class ForumThread(ForumPost):
on_delete = models.SET_NULL
)
- # @@@ sticky threads
+ sticky = models.IntegerField(default=0)
# @@@ closed threads
view_count = models.IntegerField(default=0, editable=False)
View
@@ -63,7 +63,7 @@ def forum(request, forum_id):
forum = get_object_or_404(Forum, id=forum_id)
- threads = forum.threads.order_by("-last_modified")
+ threads = forum.threads.order_by("-sticky", "-last_modified")
return render_to_response("agora/forum.html", {
"forum": forum,

0 comments on commit 2c4395b

Please sign in to comment.