Commits

Anonymous committed bd8a104

Moved post id to post page

  • Participants
  • Parent commits 3e0ec16

Comments (0)

Files changed (2)

File stack2blog/stack2blogapp/views.py

 	answersnum = len(answers)
 
 	return render_to_response('answers.html', locals(), context_instance=RequestContext(request))
+
+def post_answer(request):
+	try:
+		postid = int(request.GET.get("postid", ""))
+	except:
+		return "Bad ID" # Make a bad answer option in main page.
+
+	return render_to_response('post.html', locals(), context_instance=RequestContext(request))

File stack2blog/urls.py

 urlpatterns = patterns((""),
 	(r'^$', home_page),
 	(r'answers', user_answers),
+	(r'post', post_answer),
     # Example:
     # (r'^stack2blog/', include('stack2blog.foo.urls')),