You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
Django CKEditor:
1
+
Django CKEditor
2
2
================
3
3
**Django admin CKEditor integration.**
4
4
5
5
Provides a ``RichTextField`` and ``CKEditorWidget`` utilizing CKEditor with image upload and browsing support included.
6
6
7
7
8
-
Installation:
8
+
Installation
9
9
------------
10
10
11
11
#. Install or add django-ckeditor to your python path.
@@ -14,7 +14,7 @@ Installation:
14
14
15
15
#. Copy the ``media/ckeditor`` directory into any directory within your media root. You can override the location in your settings (see below).
16
16
17
-
#. Add a CKEDITOR_MEDIA_PREFIX setting to the project's ``settings.py`` file. This setting specifies a URL prefix to the ckeditor media. Make sure to use a trailing slash::
17
+
#. Add a CKEDITOR_MEDIA_PREFIX setting to the project's ``settings.py`` file. This setting specifies a URL prefix to the ckeditor JS and CSS media (not uploaded media). Make sure to use a trailing slash::
18
18
19
19
CKEDITOR_MEDIA_PREFIX = "/media/ckeditor/"
20
20
@@ -26,11 +26,17 @@ Installation:
26
26
27
27
(r'^ckeditor/', include('ckeditor.urls')),
28
28
29
-
Usage:
30
-
------
29
+
#. Optionally, add a CKEDITOR_UPLOAD_MEDIA_URL setting to the project's ``settings.py`` file. This is the URL from which ckeditor uploaded media is served, i.e.::
(If CKEDITOR_UPLOAD_MEDIA_URL is not provided, the media URL will fall back to MEDIA_URL with the difference of MEDIA_ROOT and CKEDITOR_UPLOAD_PATH appended.)
34
+
35
+
Usage
36
+
-----
37
+
38
+
Field
39
+
~~~~~
34
40
The quickest way to add rich text editing capabilities to your models is to use the included ``RichTextField`` model field type. A CKEditor widget is rendered as the form field but in all other regards the field behaves as the standard Django ``TextField``. For example::
35
41
36
42
from django.db import models
@@ -40,8 +46,8 @@ The quickest way to add rich text editing capabilities to your models is to use
40
46
content = RichTextField()
41
47
42
48
43
-
Widget:
44
-
~~~~~~~
49
+
Widget
50
+
~~~~~~
45
51
Alernatively you can use the included ``CKEditorWidget`` as the widget for a formfield. For example::
46
52
47
53
from django import forms
@@ -59,3 +65,12 @@ Alernatively you can use the included ``CKEditorWidget`` as the widget for a for
59
65
form = PostAdminForm
60
66
61
67
admin.site.register(Post, PostAdmin)
68
+
69
+
70
+
ChangeLog
71
+
~~~~~~~~~
72
+
73
+
0.0.1
74
+
+++++
75
+
76
+
Added CKEDITOR_UPLOAD_MEDIA_URL setting. Thanks to chr15m for the input.
0 commit comments