Bring back TinyMCE for editing flatpages

This commit is contained in:
Sam Wenham
2019-07-10 12:32:04 +01:00
parent d6053322e8
commit 4ebf3d8a0e
4 changed files with 13 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ def flatpage(request, path):
print("flat path noinfo", path)
return HttpResponseRedirect(reverse("auth_login") + '?next=%s' % request.path)
if path.endswith("/") or path == "":
if path.endswith("/") or path == "":
try:
o = open(os.path.normpath(settings.EXPOWEB + path + "index.html"), "rb")
path = path + "index.html"
@@ -165,4 +165,4 @@ def editflatpage(request, path):
class FlatPageForm(forms.Form):
title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'}))
html = forms.CharField(widget=forms.Textarea())
html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 20}))