1. dwaiter
  2. django-ckeditor

Commits

Steve Losh  committed ca9d4e4 Merge

Merge with latest.

  • Participants
  • Parent commits 46982de, b32f898
  • Branches default

Comments (0)

Files changed (5)

File .hgignore

View file
 .DS_Store
 .project
 .pydevproject
+*.swp
 
 syntax: regexp
 ^build$

File .hgtags

View file
 7372772a37d822407936700a868caa5c728de15a v0.9.0
 4936e51536fa5c49d59efaf92672ddfaed454fbe v0.9.1
 b8755f449e080ce50815a35a8ed8fde24719f317 v0.9.2
+e7f1ba644443c7960a7fd9bf8b68c39ebe9cbcc1 v0.9.3

File README.markdown

View file
     
 
 You cannot use the `HTMLField` shortcut if you want to specify a custom config
--- you *must* create a form.
+-- you *must* create a form.
+
+### Media URL
+
+You can also customize the URL that django-ckeditor will look for the CKEditor
+media at by adding `CKEDITOR_MEDIA_URL` to your `settings.py` file like this:
+
+    CKEDITOR_MEDIA_URL = '/static/third-party/ckeditor'
+
+The default value is `MEDIA_URL/ckeditor` which is why the setup instructions
+tell you to symlink it into your `media/` directory.

File ckeditor/widgets.py

View file
 CKEDITOR_CONFIGS = dict((k, json.dumps(v)) for k, v in settings.CKEDITOR_CONFIGS.items())
 FILEBROWSER_PRESENT = 'filebrowser' in getattr(settings, 'INSTALLED_APPS', [])
 GRAPPELLI_PRESENT = 'grappelli' in getattr(settings, 'INSTALLED_APPS', [])
+MEDIA_URL = getattr(
+    settings, 'CKEDITOR_MEDIA_URL', '%s/ckeditor' % settings.MEDIA_URL.rstrip('/')
+)
 
 _CSS_FILE = 'grappelli.css' if GRAPPELLI_PRESENT else 'standard.css'
 
 
     class Media:
         js = (
-            settings.MEDIA_URL.rstrip('/') + '/ckeditor/ckeditor/ckeditor.js',
+            MEDIA_URL.rstrip('/') + '/ckeditor/ckeditor.js',
         )
         css = {
             'screen': (
-                settings.MEDIA_URL.rstrip('/') + '/ckeditor/css/' + _CSS_FILE,
+                MEDIA_URL.rstrip('/') + '/css/' + _CSS_FILE,
             ),
         }
 

File setup.py

View file
 
 setup(
     name='django-ckeditor',
-    version='0.9.2',
+    version='0.9.3',
     install_requires=install_requires,
     description=description,
     long_description=long_description,