Commits

Harro van der Klauw committed ced3a04

Fixed a small bug.

Comments (0)

Files changed (3)

cmsplugin_news/widgets/tinymce_widget.py

 from tinymce.widgets import TinyMCE, get_language_config
-from django.conf.settings import CMS_MEDIA_URL
+from django.conf import settings.settings.CMS_MEDIA_URL
 from django.utils.translation import get_language
 from django.template.loader import render_to_string
 from django.utils.safestring import mark_safe
         context = {
             'name': name,
             'language': language,
-            'CMS_MEDIA_URL': CMS_MEDIA_URL,
+            'settings.CMS_MEDIA_URL': settings.CMS_MEDIA_URL,
             'installed_plugins': self.installed_plugins,
         }
         return mark_safe(render_to_string(
         
     def _media(self):
         media = super(TinyMCEEditor, self)._media()
-        media.add_js([join(CMS_MEDIA_URL, path) for path in (
+        media.add_js([join(settings.CMS_MEDIA_URL, path) for path in (
                       'js/lib/jquery.js',
                       )])
-        media.add_css({"all":[join(CMS_MEDIA_URL, path) for path in ('css/jquery/cupertino/jquery-ui.css',
+        media.add_css({"all":[join(settings.CMS_MEDIA_URL, path) for path in ('css/jquery/cupertino/jquery-ui.css',
                                                                      'css/tinymce_toolbar.css')]})
         
         return media

cmsplugin_news/widgets/wymeditor_widget.py

 from django.template.loader import render_to_string
 from django.forms import Textarea
 
-from django.conf.settings import CMS_MEDIA_URL
+from django.conf import settings
 from cms.plugins.text import settings as text_settings
 from django.utils.translation.trans_real import get_language
 
 class WYMEditor(Textarea):
     class Media:
-        js = [join(CMS_MEDIA_URL, path) for path in (
+        js = [join(settings.CMS_MEDIA_URL, path) for path in (
             'js/lib/jquery.js',
             'wymeditor/jquery.wymeditor.js',
             'wymeditor/plugins/resizable/jquery.wymeditor.resizable.js',
         context = {
             'name': name,
             'language': language,
-            'CMS_MEDIA_URL': CMS_MEDIA_URL,
+            'settings.CMS_MEDIA_URL': settings.CMS_MEDIA_URL,
             'WYM_TOOLS': mark_safe(text_settings.WYM_TOOLS),
             'WYM_CONTAINERS': mark_safe(text_settings.WYM_CONTAINERS),
             'WYM_CLASSES': mark_safe(text_settings.WYM_CLASSES),
 
 setup(
     name='cmsplugin-news',
-    version='0.2a',
+    version='0.2a2',
     description='This is a news app/plugin for the django-cms 2',
     author='Harro van der Klauw',
     author_email='hvdklauw@gmail.com',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.