Skip to content

Commit 135d346

Browse files
author
shaunsephton
committed
added CKEDITOR_UPLOAD_MEDIA_URL docs
1 parent 85e3b9f commit 135d346

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

README.rst

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Django CKEditor:
1+
Django CKEditor
22
================
33
**Django admin CKEditor integration.**
44

55
Provides a ``RichTextField`` and ``CKEditorWidget`` utilizing CKEditor with image upload and browsing support included.
66

77

8-
Installation:
8+
Installation
99
------------
1010

1111
#. Install or add django-ckeditor to your python path.
@@ -14,7 +14,7 @@ Installation:
1414

1515
#. Copy the ``media/ckeditor`` directory into any directory within your media root. You can override the location in your settings (see below).
1616

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::
1818

1919
CKEDITOR_MEDIA_PREFIX = "/media/ckeditor/"
2020

@@ -26,11 +26,17 @@ Installation:
2626
2727
(r'^ckeditor/', include('ckeditor.urls')),
2828

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.::
3130

32-
Field:
33-
~~~~~~
31+
CKEDITOR_UPLOAD_MEDIA_URL = "http://media.lawrence.com/media/uploads/
32+
33+
(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+
~~~~~
3440
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::
3541

3642
from django.db import models
@@ -40,8 +46,8 @@ The quickest way to add rich text editing capabilities to your models is to use
4046
content = RichTextField()
4147

4248

43-
Widget:
44-
~~~~~~~
49+
Widget
50+
~~~~~~
4551
Alernatively you can use the included ``CKEditorWidget`` as the widget for a formfield. For example::
4652

4753
from django import forms
@@ -59,3 +65,12 @@ Alernatively you can use the included ``CKEditorWidget`` as the widget for a for
5965
form = PostAdminForm
6066
6167
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

Comments
 (0)