djace_editor provides integration for ajax.org ACE with Django
Project description
What’s that
djace_editor is a reusable application for Django, using Ace editor
Forked on Bradley Ayers.
Dependence
Django >= 1.9
Getting started
Install djace_editor:
`pip install djace_editor`
Add ‘djace_editor’ to INSTALLED_APPS.
Using in model
from django.db import models
from djace_editor import AceField
class Entry(models.Model):
title = models.CharField(max_length=250, verbose_name=u'Title')
text = AceField(verbose_name=u'Text')
or use custom parametrs:
text = AceField(
verbose_name=u'Text',
theme="terminal",
width="800px",
height="500px"
)
Using for only admin interface
from django import forms
from djace_editor import AceWidget
from blog.models import Entry
class EntryAdminForm(forms.ModelForm):
class Meta:
model = Entry
widgets = {
'short_text': AceWidget(),
}
class EntryAdmin(admin.ModelAdmin):
form = EntryAdminForm
AceWidget takes the same parameters as AceField.
Contributing
Fork it!
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am ‘Add some feature’
Push to the branch: git push origin my-new-feature
Submit a pull request =]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djace_editor-1.0.0.tar.gz
(1.9 MB
view hashes)
Built Distribution
Close
Hashes for djace_editor-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3490cee5234517baa98bcdaf62d372d2d6240cefb1c94998107da11bf809101d |
|
MD5 | 4f5f0abbca01f609106376d6add5a66e |
|
BLAKE2b-256 | 22fd62c149fe0dff0bfde8bed9f30fae139afad89506f228c2a97f0ceb27bd64 |