From bc6f2e1286edea48074766116a36fa35905f28a4 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Mon, 4 Sep 2017 13:32:21 -0400 Subject: [PATCH 1/4] Revert "Added HTML editor" This reverts commit a8a4c8d --- OACPL/settings.base.py | 1 - OACPL/urls.py | 5 ++--- newsletters/templates/newsletters.html | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/OACPL/settings.base.py b/OACPL/settings.base.py index 51c244e..1904b2f 100644 --- a/OACPL/settings.base.py +++ b/OACPL/settings.base.py @@ -40,7 +40,6 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'forum.apps.ForumConfig', - 'froala_editor', 'main.apps.MainConfig', 'newsletters.apps.NewslettersConfig' ] diff --git a/OACPL/urls.py b/OACPL/urls.py index b62233c..554f489 100644 --- a/OACPL/urls.py +++ b/OACPL/urls.py @@ -1,7 +1,7 @@ import os from django.conf import settings -from django.conf.urls import include, url +from django.conf.urls import url from django.contrib import admin from django.contrib.auth.decorators import login_required from django.views.static import serve @@ -21,9 +21,8 @@ urlpatterns = [ url(r'^admin/logout', main.views.logout, name='logout'), url(r'^admin/', admin.site.urls, name='admin'), url(r'^attorney/(?P\d+)', charter_members.views.index, name='attorney'), - url(r'^froala_editor/', include('froala_editor.urls')), url(r'^media/secure/(?P.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'), url(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media'), url(r'^newsletter/subscribe', newsletters.views.subscribe, name='subscribe'), - url(r'^newsletter/', newsletters.views.newsletters, name='newsletters'), + url(r'^newsletter/', newsletters.views.newsletters, name='newsletters') ] diff --git a/newsletters/templates/newsletters.html b/newsletters/templates/newsletters.html index dacd87a..3474985 100644 --- a/newsletters/templates/newsletters.html +++ b/newsletters/templates/newsletters.html @@ -26,7 +26,7 @@
- {{ newsletter.body | safe }} + {{ newsletter.body }}
From 532468a5dd746107af36ab488a182b81624226ef Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Mon, 4 Sep 2017 13:32:31 -0400 Subject: [PATCH 2/4] Revert "Revert "Added HTML editor"" This reverts commit bc6f2e1 --- OACPL/settings.base.py | 1 + OACPL/urls.py | 5 +++-- newsletters/templates/newsletters.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OACPL/settings.base.py b/OACPL/settings.base.py index 1904b2f..51c244e 100644 --- a/OACPL/settings.base.py +++ b/OACPL/settings.base.py @@ -40,6 +40,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'forum.apps.ForumConfig', + 'froala_editor', 'main.apps.MainConfig', 'newsletters.apps.NewslettersConfig' ] diff --git a/OACPL/urls.py b/OACPL/urls.py index 554f489..b62233c 100644 --- a/OACPL/urls.py +++ b/OACPL/urls.py @@ -1,7 +1,7 @@ import os from django.conf import settings -from django.conf.urls import url +from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth.decorators import login_required from django.views.static import serve @@ -21,8 +21,9 @@ urlpatterns = [ url(r'^admin/logout', main.views.logout, name='logout'), url(r'^admin/', admin.site.urls, name='admin'), url(r'^attorney/(?P\d+)', charter_members.views.index, name='attorney'), + url(r'^froala_editor/', include('froala_editor.urls')), url(r'^media/secure/(?P.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'), url(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media'), url(r'^newsletter/subscribe', newsletters.views.subscribe, name='subscribe'), - url(r'^newsletter/', newsletters.views.newsletters, name='newsletters') + url(r'^newsletter/', newsletters.views.newsletters, name='newsletters'), ] diff --git a/newsletters/templates/newsletters.html b/newsletters/templates/newsletters.html index 3474985..dacd87a 100644 --- a/newsletters/templates/newsletters.html +++ b/newsletters/templates/newsletters.html @@ -26,7 +26,7 @@
- {{ newsletter.body }} + {{ newsletter.body | safe }}
From e3961d8d800ecb16f2c11a72033af78df73c3e67 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Mon, 4 Sep 2017 13:45:13 -0400 Subject: [PATCH 3/4] Removed froala license message --- templates/admin/base_site.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html index fe10ab4..87be3d7 100644 --- a/templates/admin/base_site.html +++ b/templates/admin/base_site.html @@ -13,6 +13,12 @@ #newslettersubscription-group input { transform: translate(-20px, 4px) } + + a[href="http://editor.froala.com"] { + display: none !important; + position: absolute; + top: -99999999px; + } {% endblock %} From 5bd1cc4939c1d1beec805136ae54b3b990d2b74a Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Mon, 4 Sep 2017 13:46:47 -0400 Subject: [PATCH 4/4] Fixed url --- templates/admin/base_site.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html index 87be3d7..e6a3e83 100644 --- a/templates/admin/base_site.html +++ b/templates/admin/base_site.html @@ -14,7 +14,7 @@ transform: translate(-20px, 4px) } - a[href="http://editor.froala.com"] { + a[href="https://www.froala.com/wysiwyg-editor?k=u"] { display: none !important; position: absolute; top: -99999999px;