Skip to content

A Django app to add support for redactor

License

Notifications You must be signed in to change notification settings

EJLN9818/ax3-redactor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AX3 Redactor

This app is part of the AX3 technology developed by Axiacore.

It will allow to use redactor inside the django admin interface.

Quick start

  1. Add "redactor" to your INSTALLED_APPS setting like this:
    INSTALLED_APPS = [
        ...
        'redactor',
    ]
  1. Include the redactor URLconf in your project urls.py like this:
    path('', include('redactor.urls')),
  1. Run python manage.py migrate to create the redactor models.

  2. Copy this redactor library files into a static folder in your proyect:

    vendor/redactor/redactor.min.css
    vendor/redactor/redactor.min.js
    vendor/redactor/plugins/imagemanager.min.js
    vendor/redactor/plugins/video.min.js
  1. Add to the admin.py the redactor support for a given model:
    from django.contrib import admin

    from redactor.mixins import RedactorMixin

    from .models import Post


    @admin.register(Post)
    class PostAdmin(RedactorMixin, admin.ModelAdmin):
        ...

        redactor_fields = ['content']

        ...

content is a TextField attribute at the Post model. You can use multiple fields.

About

A Django app to add support for redactor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.3%
  • CSS 5.1%
  • JavaScript 4.5%
  • Shell 1.1%