From 1cfc11ce501c3856578010fb1d3db317a44942b5 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@bioforsk.no> Date: Tue, 21 Jul 2015 10:03:45 +0200 Subject: [PATCH] Adding a bit more editing possibilities in TinyMCE fields --- VIPSWeb/settings.py | 3 +++ VIPSWeb/urls.py | 2 +- information/admin.py | 2 ++ information/models.py | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VIPSWeb/settings.py b/VIPSWeb/settings.py index c95c3a36..f03643ff 100644 --- a/VIPSWeb/settings.py +++ b/VIPSWeb/settings.py @@ -137,6 +137,9 @@ INSTALLED_APPS = ( 'VIPSWeb' ) +TINYMCE_DEFAULT_CONFIG = {'theme': "advanced", 'relative_urls': False} +TINYMCE_COMPRESSOR = True + SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' # A sample logging configuration. The only tangible logging diff --git a/VIPSWeb/urls.py b/VIPSWeb/urls.py index 5fdf60a2..fd1a58df 100644 --- a/VIPSWeb/urls.py +++ b/VIPSWeb/urls.py @@ -45,7 +45,7 @@ urlpatterns = patterns('', url(r'^organisms/', include('organisms.urls', namespace = "organisms")), url(r'^information/', include('information.urls', namespace = "information")), url(r'^blotch/', include('cerealblotchmodels.urls', namespace = "cerealblotchmodels")), - url(r'^calculators/', include('calculators.urls', namespace = "calcualtors")), + url(r'^calculators/', include('calculators.urls', namespace = "calculators")), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), diff --git a/information/admin.py b/information/admin.py index cfc9bcc8..96ca7a73 100644 --- a/information/admin.py +++ b/information/admin.py @@ -18,10 +18,12 @@ from django.contrib import admin from information.models import Information, InformationLocale + # Register your models here. class InformationLocaleInline(admin.TabularInline): model = InformationLocale fields = ['language_code', 'headline', 'lead_paragraph', 'body'] + """ # This actually works, but CSS overrides the size attribute... def formfield_for_dbfield(self, db_field, **kwargs): diff --git a/information/models.py b/information/models.py index b012991d..c1996eeb 100644 --- a/information/models.py +++ b/information/models.py @@ -1,7 +1,7 @@ from django.db import models +from tinymce import models as tinymce_models from django.conf import settings from django.utils import translation -from tinymce import models as tinymce_models # Create your models here. -- GitLab