django-imperavi 0.2.3

A django application that contains a class for admin interface to render a text field as beautiful Imperavi WYSIWYG editor http://redactorjs.com/

Installation

  1. Install or add django-imperavi to your python path.

  2. Add imperavi to your INSTALLED_APPS setting.

  3. Add imperavi URL include to your project's urls.py file:

    url(r'^imperavi/', include('imperavi.urls')),
    

Usage

The quickest way to add rich text editing capabilities to your admin is to use the included ImperaviAdmin class. For example:

from models import Category
from imperavi.admin import ImperaviAdmin

class CategotyAdmin(ImperaviAdmin):
    pass

admin.site.register(Category, CategotyAdmin)

If you want to use it with inline admin models you need to use ImperaviStackedInlineAdmin class:

from models import Post
from imperavi.admin import ImperaviStackedInlineAdmin

class PostInline(ImperaviStackedInlineAdmin):
    model = Post
    extra = 1

Custom settings

Add a IMPERAVI_CUSTOM_SETTINGS variable to your settings.py with custom config:

IMPERAVI_CUSTOM_SETTINGS = {
    'lang': 'ua',
    'toolbar': 'mini',
    'resize': true
}

Full list of settings is here.

Media URL

You can also customize the URL that django-imperavi will look for the Editor media at by adding IMPERAVI_UPLOAD_PATH to your settings.py file like this:

IMPERAVI_UPLOAD_PATH = 'imperavi-uploads/'

The default value is 'imperavi/'.

Unique images per model

If you want to serve unique media content for specific model you can add unique_media = True to your admin class:

from models import Category
from imperavi.admin import ImperaviAdmin

class CategotyAdmin(ImperaviAdmin):
    unique_media = True

admin.site.register(Category, CategotyAdmin)
MIT License

Author

Vasyl Stanislavchuk

Pip

django-imperavi==0.2.3
File Type Python Version Uploaded On Downloads
django-imperavi-0.2.3.tar.gz Source July 1, 2012 8,331
Version Release Date
0.2.3 July 1, 2012
0.2.2 June 18, 2012
0.2.1 June 18, 2012
0.2.0 June 16, 2012
0.1.7 June 16, 2012
0.1.6 May 24, 2012
0.1.5dev May 21, 2012
0.1.4dev May 20, 2012
Date Package Version Action
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.1.7 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.1.6 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.1.5dev Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.2.0 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.2.1 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.2.2 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.2.3 Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi 0.1.4dev Release Created
Aug. 26, 2015, 12:13 a.m. django-imperavi Package Created