Revert "Revert "Added HTML editor""

This reverts commit bc6f2e1
This commit is contained in:
Zak Timson 2017-09-04 13:32:31 -04:00
parent bc6f2e1286
commit 532468a5dd
3 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,7 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'forum.apps.ForumConfig', 'forum.apps.ForumConfig',
'froala_editor',
'main.apps.MainConfig', 'main.apps.MainConfig',
'newsletters.apps.NewslettersConfig' 'newsletters.apps.NewslettersConfig'
] ]

View File

@ -1,7 +1,7 @@
import os import os
from django.conf import settings 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 import admin
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.views.static import serve from django.views.static import serve
@ -21,8 +21,9 @@ urlpatterns = [
url(r'^admin/logout', main.views.logout, name='logout'), url(r'^admin/logout', main.views.logout, name='logout'),
url(r'^admin/', admin.site.urls, name='admin'), url(r'^admin/', admin.site.urls, name='admin'),
url(r'^attorney/(?P<id>\d+)', charter_members.views.index, name='attorney'), url(r'^attorney/(?P<id>\d+)', charter_members.views.index, name='attorney'),
url(r'^froala_editor/', include('froala_editor.urls')),
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'), url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'),
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media'), url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media'),
url(r'^newsletter/subscribe', newsletters.views.subscribe, name='subscribe'), 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'),
] ]

View File

@ -26,7 +26,7 @@
</div> </div>
<div id="newsletter-body-{{ newsletter.id }}" class="bg-light-blue collapse"> <div id="newsletter-body-{{ newsletter.id }}" class="bg-light-blue collapse">
<div class="p-3"> <div class="p-3">
{{ newsletter.body }} {{ newsletter.body | safe }}
</div> </div>
</div> </div>
</div> </div>