from wiki.helpers import (JSONResponse, JSONFormInvalid, JSONServerError,
ajax_require_permission)
from wiki.helpers import (JSONResponse, JSONFormInvalid, JSONServerError,
ajax_require_permission)
from django.views.decorators.http import require_GET, require_POST
from django.conf import settings
from django.utils.formats import localize
from django.views.decorators.http import require_GET, require_POST
from django.conf import settings
from django.utils.formats import localize
"text_revert": forms.DocumentTextRevertForm(prefix="textrevert"),
"pubmark": forms.DocumentPubmarkForm(prefix="pubmark"),
},
"text_revert": forms.DocumentTextRevertForm(prefix="textrevert"),
"pubmark": forms.DocumentPubmarkForm(prefix="pubmark"),
},
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():
stage = form.cleaned_data['stage_completed']
tags = [stage] if stage else []
publishable = (form.cleaned_data['publishable'] and
stage = form.cleaned_data['stage_completed']
tags = [stage] if stage else []
publishable = (form.cleaned_data['publishable'] and
"author": change.author_str(),
"date": localize(change.created_at),
"publishable": _("Publishable") + "\n" if change.publishable else "",
"author": change.author_str(),
"date": localize(change.created_at),
"publishable": _("Publishable") + "\n" if change.publishable else "",
def pubmark(request, object_id):
form = forms.DocumentPubmarkForm(request.POST, prefix="pubmark")
if form.is_valid():
def pubmark(request, object_id):
form = forms.DocumentPubmarkForm(request.POST, prefix="pubmark")
if form.is_valid():