Permalink
Browse files

tweaked view and URL names

  • Loading branch information...
1 parent 2a83adc commit 15f14cef38d8ac14910bd2aa72d39cf9f99134be @brosner brosner committed Dec 17, 2011
Showing with 7 additions and 6 deletions.
  1. +3 −2 agora/urls.py
  2. +4 −4 agora/views.py
View
@@ -5,9 +5,10 @@
url(r"^$", "agora.views.forums", name="agora_forums"),
url(r"^category/(\d+)/$", "agora.views.forum_category", name="agora_category"),
url(r"^forum/(\d+)/$", "agora.views.forum", name="agora_forum"),
+ url(r"^forum/(\d+)/$", "agora.views.forum", name="agora_forum"),
url(r"^thread/(\d+)/$", "agora.views.forum_thread", name="agora_thread"),
- url(r"^new_post/(\d+)/$", "agora.views.new_post", name="agora_new_post"),
- url(r"^reply/(\d+)/$", "agora.views.reply", name="agora_reply"),
+ url(r"^new_post/(\d+)/$", "agora.views.post_create", name="agora_post_create"),
+ url(r"^reply/(\d+)/$", "agora.views.reply_create", name="agora_reply_create"),
url(r"^post_edit/(thread|reply)/(\d+)/$", "agora.views.post_edit", name="agora_post_edit"),
url(r"^subscribe/(\d+)/$", "agora.views.subscribe", name="agora_subscribe"),
url(r"^unsubscribe/(\d+)/$", "agora.views.unsubscribe", name="agora_unsubscribe"),
View
@@ -106,7 +106,7 @@ def forum_thread(request, thread_id):
@ajax
@login_required
-def new_post(request, forum_id):
+def post_create(request, forum_id):
member = request.user.get_profile()
forum = get_object_or_404(Forum, id=forum_id)
@@ -129,15 +129,15 @@ def new_post(request, forum_id):
return HttpResponseRedirect(reverse("agora_thread", args=[thread.id]))
- return render_to_response("agora/new_post.html", {
+ return render_to_response("agora/post_create.html", {
"member": member,
"forum_id": forum_id,
}, context_instance=RequestContext(request))
@ajax
@login_required
-def reply(request, thread_id):
+def reply_create(request, thread_id):
member = request.user.get_profile()
thread = get_object_or_404(ForumThread, id=thread_id)
@@ -168,7 +168,7 @@ def reply(request, thread_id):
first_reply = not ForumReply.objects.filter(thread=thread, author=request.user).exists()
- return render_to_response("agora/reply.html", {
+ return render_to_response("agora/reply_create.html", {
"member": member,
"thread": thread,
"quote_content": quote_content,

0 comments on commit 15f14ce

Please sign in to comment.