Added tinymce4

This commit is contained in:
Zakary Timson 2018-01-05 19:12:27 -05:00
parent 66cdd590c3
commit 1e45e62a4b
4 changed files with 8 additions and 5 deletions

View File

@ -51,7 +51,8 @@ INSTALLED_APPS = [
'expert_witnesses',
'forum.apps.ForumConfig',
'main.apps.MainConfig',
'newsletters.apps.NewslettersConfig'
'newsletters.apps.NewslettersConfig',
'tinymce'
]
MIDDLEWARE = [
@ -142,5 +143,3 @@ STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
CKEDITOR_UPLOAD_PATH = 'ckeditor'

View File

@ -39,5 +39,6 @@ urlpatterns = [
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'^newsletter/subscribe', newsletters.views.subscribe, name='subscribe'),
url(r'^newsletter/', newsletters.views.newsletters, name='newsletters')
url(r'^newsletter/', newsletters.views.newsletters, name='newsletters'),
url(r'^tinymce/', include('tinymce.urls'))
]

View File

@ -2,9 +2,11 @@ from django.db import models
from django.contrib.auth.admin import User
from django.utils import timezone
from tinymce.models import HTMLField
class Newsletter(models.Model):
body = models.TextField()
body = HTMLField()
created = models.DateTimeField(auto_now_add=True)
creator = models.ForeignKey(User)
publish = models.DateTimeField(default=timezone.now)

View File

@ -2,3 +2,4 @@ bootstrap-admin==0.3.7.1
Django==1.11.5
Pillow==4.2.1
requests==2.11.1
django-tinymce4-lite==1.7.0