]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/writers.py
Fixing some encoding/decoding errors, including the akismate module, and fixed the...
[osqa.git] / forum / views / writers.py
index 3b3e90b5c951792f414a62529d63afee56ceeb6f..5bddc6040b070c692cf8e21bdf98bf40e9d737a8 100644 (file)
@@ -91,7 +91,7 @@ def ask(request):
 @login_required
 def edit_question(request, id):
     question = get_object_or_404(Question, id=id)
-    if question.deleted and not request.user.can_view_deleted_post(question):
+    if question.nis.deleted and not request.user.can_view_deleted_post(question):
         raise Http404
     if request.user.can_edit_post(question):
         return _edit_question(request, question)
@@ -196,6 +196,9 @@ def answer(request, id):
                 request.session['temp_node_type'] = 'answer'
                 request.session['temp_question_id'] = id
                 return HttpResponseRedirect(reverse('auth_action_signin', kwargs={'action': 'newquestion'}))
+        else:
+            request.session['redirect_POST_data'] = request.POST
+            return HttpResponseRedirect(question.get_absolute_url() + '#fmanswer')
 
     return HttpResponseRedirect(question.get_absolute_url())