Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-codemirror-widget

How to install django-codemirror-widget

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-codemirror-widget
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1rc3
0.3.0Never BuiltWhy not?
0.1rc3 Available View build log
Windows (64-bit)
0.1rc3
0.3.0Never BuiltWhy not?
0.1rc3 Available View build log
Mac OS X (10.5+)
0.1rc3
0.3.0Never BuiltWhy not?
0.1rc3 Available View build log
Linux (32-bit)
0.1rc3
0.3.0Never BuiltWhy not?
0.2.0 Failed View build log
0.1rc3 Available View build log
Linux (64-bit)
0.3.0 Available View build log
0.2.0 Failed View build log
0.1rc3 Available View build log
 
Author
License
BSD
Dependencies
Imports
Lastest release
version 0.3.0 on Jan 9th, 2014

Django form widget library for using CodeMirror on Textarea

Install

sudo pip install django-codemirror-widget

or

sudo pip install git+git://github.com/lambdalisue/django-codemirror-widget.git#egg=django-code-mirror

How to Use

  1. First, you need to specified CODEMIRROR_PATH on settings.py. CODEMIRROR_PATH is the URI of CodeMirror directory like CODEMIRROR_PATH = r"javascript/codemirror". If you don't specify it, it defaults to 'codemirror'. CodeMirror should be put there.

  2. Use codemirror.widgets.CodeMirrorTextarea widgets for target Textarea like below:

    from django import forms
    from codemirror.widgets import CodeMirrorTextarea
    
    codemirror = CodeMirrorTextarea(mode="python", theme="cobalt", config={ 'fixedGutter': True })
    document = forms.TextField(widget=codemirror)
    

Settings

CODEMIRROR_PATH
the URI of CodeMirror directory (your CodeMirror installation should live in {{ STATIC_URL }}/{{ CODEMIRROR_PATH }})
CODEMIRROR_MODE
the default mode which may be a string or configuration map (DEFAULT: 'javascript')
CODEMIRROR_THEME
the default theme applied (DEFAULT: 'default')
CODEMIRROR_CONFIG
base mapping for the rest of the CodeMirror options (DEFAULT: { 'lineNumbers': True })

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.