Added CKEditor

This commit is contained in:
Zakary Timson 2017-09-29 20:07:18 -04:00
parent 7234777934
commit aeb66ace4d
5 changed files with 10 additions and 9 deletions

View File

@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_URL = 'http://oacpl.zakscode.com'
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -41,6 +42,8 @@ INSTALLED_APPS = [
'bootstrap_admin',
'case_law',
'charter_members.apps.CharterMembersConfig',
'ckeditor',
'ckeditor_uploader',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',

View File

@ -1,7 +1,7 @@
import os
from django.conf import settings
from django.conf.urls import url
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.shortcuts import Http404
@ -27,6 +27,7 @@ urlpatterns = [
url(r'^admin/', admin.site.urls, name='admin'),
url(r'^attorney/(?P<id>\d+)', charter_members.views.index, name='attorney'),
url(r'^caselaw/', case_law.views.browser, name='caselaw'),
url(r'^ckeditor/', include('ckeditor_uploader.urls')),
url(r'^contact/', main.views.contact, name='contact'),
url(r'^experts/(?P<id>\d+)', expert_witnesses.views.viewer, name='expert'),
url(r'^experts/', expert_witnesses.views.browser, name='experts'),

View File

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

View File

@ -1,4 +1,5 @@
bootstrap-admin==0.3.7.1
Django==1.11.4
Django==1.11.5
Pillow==4.2.1
requests==2.11.1
django-ckeditor==5.3.0

View File

@ -14,12 +14,6 @@
#newslettersubscription-group input {
transform: translate(-20px, 4px)
}
a[href="https://www.froala.com/wysiwyg-editor?k=u"] {
display: none !important;
position: absolute;
top: -99999999px;
}
</style>
{% endblock %}