Skip to content

Creates a CodeMirror widget that can be added to a page/form.

License

Notifications You must be signed in to change notification settings

mouhtasi/codemirror-django-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creates a CodeMirror widget that can be added to a page/form.

settings.py:

INSTALLED_APPS = (
    ...
    'codemirror',
    ...
)

# Default config
CODEMIRROR_CONFIG = {
    'lineNumbers': True,
}

Usage: forms.py in the main app:

from django import forms
from codemirror.widgets import CodeMirror

class SomeForm(forms.Form):
    text = forms.CharField(widget=CodeMirror(mode='python'))

About

Creates a CodeMirror widget that can be added to a page/form.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published