Mikhail Korobov  committed ad050c9

Use MARKUP_FILTER as a default value for MARKITUP_PREVIEW_FILTER. I think MARKITUP_PREVIEW_FILTER may be deprecated in favor of more general MARKUP_FILTER.

  • Participants
  • Parent commits 0596e6a

Comments (0)

Files changed (2)

        files, making a symlink, or through your webserver configuration.
     3. If you want to use AJAX-based preview:
         - Add ``url(r'^markitup/', include('markitup.urls')`` in your
           root URLconf.
-        - Set the MARKITUP_PREVIEW_FILTER setting (see `Using AJAX preview`_ 
-          below).
+        - Set the MARKUP_FILTER (or MARKITUP_PREVIEW_FILTER) setting
+          (see `Using AJAX preview`_ below).
 Using the MarkItUp! widget
 media somewhere on the page using ``{{ }}``, or the
 MarkItUpWidget will have no effect.
-To use MarkItUpWidget in the Django admin::
+To use widget in the Django admin::
-    from markitup.widgets import MarkItUpWidget
+    from markitup.widgets import AdminMarkItUpWidget
     class MyModelAdmin(admin.ModelAdmin):
     def formfield_for_dbfield(self, db_field, **kwargs):
         if == 'content':
-            kwargs['widget'] = MarkItUpWidget(attrs={'class': 'vLargeTextField'})
+            kwargs['widget'] = AdminMarkItUpWidget()
         return super(MyModelAdmin, self).formfield_for_dbfield(db_field, **kwargs)
 You can also use the formfield_overrides attribute of the ModelAdmin, which
     {{ form.fieldname }}
     {% markitup_editor form.fieldname.auto_id %}
 You can use ``markitup_editor`` on as many different textareas as you
 If you've included ``markitup.urls`` in your root URLconf (as
 demonstrated above under `Installation`_), all you need to enable
-server-side AJAX preview is the ``MARKITUP_PREVIEW_FILTER`` setting.
+server-side AJAX preview is the ``MARKUP_FILTER`` setting.
-``MARKITUP_PREVIEW_FILTER`` must be a two-tuple.  
+``MARKUP_FILTER`` must be a two-tuple.
 The first element must be a string, the Python dotted path to a markup
 filter function.  This function should accept markup as its first
 For example, if you have python-markdown installed, you could use it
 like this::
-    MARKITUP_PREVIEW_FILTER = ('markdown.markdown', {'safe_mode': True})
+    MARKUP_FILTER = ('markdown.markdown', {'safe_mode': True})
 Alternatively, you could use the "textile" filter provided by Django
 like this::
-    MARKITUP_PREVIEW_FILTER = ('django.contrib.markup.templatetags.markup.textile', {})
+    MARKUP_FILTER = ('django.contrib.markup.templatetags.markup.textile', {})
 (The textile filter function doesn't accept keyword arguments, so the
 kwargs dictionary must be empty in this case.)
 **Note:** If you use your own custom MarkItUp! set, be sure to set the
   ``previewParserPath`` option to ``'/markitup/preview/'``.
+**Note** Old ``MARKITUP_PREVIEW_FILTER`` name for ``MARKUP_FILTER`` option
+is still supported.
 Other settings

File markitup/

 from django.conf import settings
+                                  getattr(settings, 'MARKUP_FILTER', None))
 MARKITUP_SET = getattr(settings, 'MARKITUP_SET', 'markitup/sets/default')
 MARKITUP_SKIN = getattr(settings, 'MARKITUP_SKIN', 'markitup/skins/simple')
 JQUERY_URL = getattr(