X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/084544e4f7c9269b1445a9e5109fa641a3e1aaac..fc330c6c7cee602ac344c3f180065a70226dae8a:/apps/wiki/views.py diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 339bde8c..33d6610b 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -1,5 +1,5 @@ from django.views.generic.simple import direct_to_template -from django.http import HttpResponseRedirect +from django.http import HttpResponse, HttpResponseRedirect from wiki.models import storage, Document, DocumentNotFound from wiki.forms import DocumentForm @@ -21,7 +21,9 @@ def document_detail(request, name, template_name='wiki/document_details.html'): form = DocumentForm(request.POST, instance=document) if form.is_valid(): form.save() - return HttpResponseRedirect('/') + return HttpResponse('OK') + else: + print form.errors else: form = DocumentForm(instance=document)