fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
You will find only what you bring in.
[redakcja.git]
/
src
/
wiki_img
/
views.py
diff --git
a/src/wiki_img/views.py
b/src/wiki_img/views.py
index
e5bbf41
..
280848a
100644
(file)
--- a/
src/wiki_img/views.py
+++ b/
src/wiki_img/views.py
@@
-1,9
+1,12
@@
+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import os
import functools
import logging
logger = logging.getLogger("fnp.wiki_img")
import os
import functools
import logging
logger = logging.getLogger("fnp.wiki_img")
-from django.
core.urlresolver
s import reverse
+from django.
url
s import reverse
from wiki.helpers import (JSONResponse, JSONFormInvalid, JSONServerError,
ajax_require_permission)
from wiki.helpers import (JSONResponse, JSONFormInvalid, JSONServerError,
ajax_require_permission)
@@
-63,7
+66,7
@@
def text(request, image_id):
if request.method == 'POST':
form = ImageSaveForm(request.POST, user=request.user, prefix="textsave")
if form.is_valid():
if request.method == 'POST':
form = ImageSaveForm(request.POST, user=request.user, prefix="textsave")
if form.is_valid():
- if request.user.is_authenticated
()
:
+ if request.user.is_authenticated:
author = request.user
else:
author = None
author = request.user
else:
author = None
@@
-148,7
+151,7
@@
def revert(request, object_id):
comment = form.cleaned_data['comment']
comment += "\n#revert to %s" % revision
comment = form.cleaned_data['comment']
comment += "\n#revert to %s" % revision
- if request.user.is_authenticated
()
:
+ if request.user.is_authenticated:
author = request.user
else:
author = None
author = request.user
else:
author = None