aldryn-snippet

Snippets


Keywords
deprecated
License
Other
Install
pip install aldryn-snippet==0.1.5

Documentation

Aldryn Snippet

Build Status Coverage Status

Snippets with code editor and syntax highlighting.

Aldryn Snippet allows you to insert arbitrary code into an HTML document.

Aldryn Snippet is intended as a quick and convenient tool for developers. It is not intended for everyday content management usage.

Warning: as Snippet permits the insertion of arbitrary code, careless use can represent a security risk. Aldryn Snippet must be used appropriately and with caution.

preview

Installation

Install using pip:

$ pip install aldryn-snippet

and add aldryn_snippet to your INSTALLED_APPS. Afterwards, sync your database.

Configuration

  • ALDRYN_SNIPPET_ACE_THEME: Custom Editor Theme (i.e. ace/theme/solarized_dark)
  • ALDRYN_SNIPPET_ACE_MODE: Custom Editor Mode (i.e. ace/mode/html)

Migration from djangocms-snippet

You can also use migrate the snippets from djangocms-snippet to aldryn-snippet using the following command:

$ python manage.py migrate_from_djangocms_snippet

# if you want to keep the old snippets in the admin interface use:
$ python manage.py migrate_from_djangocms_snippet --keep