@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)
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())