Install

pip install djangocodemirror
  1. In your settings file add djangocodemirror to your installed apps:

    INSTALLED_APPS = (
        ...
        'djangocodemirror',
        ...
    )
    
  2. Import default settings:

    from djangocodemirror.settings import *
    
  3. Optionally install django-assets to use asset bundles;

Finally you may want to change available CodeMirror configurations from settings.CODEMIRROR_SETTINGS: