Skip to main content

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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-imperavi-0.2.1.tar.gz (95.4 kB view details)

Uploaded Source

File details

Details for the file django-imperavi-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django-imperavi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bd3eff61351afc9cbdb34d5ddfa49440a71ad216caa8493b6e1e314c9025496f
MD5 73f721f5c8807969975559a56d9f48cb
BLAKE2b-256 eb968a0f705388dbf5795fea90e27b97fab1893bacb4ba2d5ddf0848238ea53f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.3

1 file

0.2.2

1 file

This release

0.2.1 This release

1 file

0.2.0

1 file

0.1.7

1 file

0.1.6

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page