fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Poprawienie wyglądu tytułu dokumentu w document_details.html.
[redakcja.git]
/
apps
/
wiki
/
views.py
diff --git
a/apps/wiki/views.py
b/apps/wiki/views.py
index
339bde8
..
33d6610
100644
(file)
--- 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.views.generic.simple import direct_to_template
-from django.http import HttpResponseRedirect
+from django.http import HttpResponse
, HttpResponse
Redirect
from wiki.models import storage, Document, DocumentNotFound
from wiki.forms import DocumentForm
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()
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)
else:
form = DocumentForm(instance=document)