mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
Bring back TinyMCE for editing flatpages
This commit is contained in:
parent
d6053322e8
commit
4ebf3d8a0e
@ -165,4 +165,4 @@ def editflatpage(request, path):
|
|||||||
class FlatPageForm(forms.Form):
|
class FlatPageForm(forms.Form):
|
||||||
title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'}))
|
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}))
|
||||||
|
@ -47,13 +47,13 @@ MEDIA_URL = URL_ROOT + DIR_ROOT + 'site_media/'
|
|||||||
MEDIA_ROOT = REPOS_ROOT_PATH + '/troggle/media/'
|
MEDIA_ROOT = REPOS_ROOT_PATH + '/troggle/media/'
|
||||||
MEDIA_ADMIN_DIR = '/usr/lib/python2.7/site-packages/django/contrib/admin/media/'
|
MEDIA_ADMIN_DIR = '/usr/lib/python2.7/site-packages/django/contrib/admin/media/'
|
||||||
|
|
||||||
STATIC_URL = URL_ROOT
|
STATIC_URL = "/static/"
|
||||||
STATIC_ROOT = DIR_ROOT
|
STATIC_ROOT = "/expo/static"
|
||||||
|
|
||||||
JSLIB_URL = URL_ROOT + 'javascript/'
|
JSLIB_URL = URL_ROOT + 'javascript/'
|
||||||
|
|
||||||
TINY_MCE_MEDIA_ROOT = '/usr/share/tinymce/www/'
|
TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/'
|
||||||
TINY_MCE_MEDIA_URL = URL_ROOT + DIR_ROOT + '/tinymce_media/'
|
TINY_MCE_MEDIA_URL = STATIC_ROOT + '/tiny_mce/'
|
||||||
|
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
PYTHON_PATH + "templates",
|
PYTHON_PATH + "templates",
|
||||||
|
@ -52,8 +52,8 @@ MEDIA_ADMIN_DIR = '/usr/lib/python2.7/site-packages/django/contrib/admin/media/'
|
|||||||
|
|
||||||
JSLIB_URL = URL_ROOT + 'javascript/'
|
JSLIB_URL = URL_ROOT + 'javascript/'
|
||||||
|
|
||||||
TINY_MCE_MEDIA_ROOT = '/usr/share/tinymce/www/'
|
TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/'
|
||||||
TINY_MCE_MEDIA_URL = URL_ROOT + DIR_ROOT + 'tinymce_media/'
|
TINY_MCE_MEDIA_URL = STATIC_ROOT + '/tiny_mce/'
|
||||||
|
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
PYTHON_PATH + "templates",
|
PYTHON_PATH + "templates",
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{% load csrffaker %}
|
{% load csrffaker %}
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
tinyMCE.init({
|
||||||
|
mode : "textareas"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Edit {{ path }}</h1>
|
<h1>Edit {{ path }}</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user