Package: fdemmer-django-ace
django-ace provides integration forAce - The High Performance Code Editor for the Webwith Django.django-ace is a fork of Kit Sunde’s django-ace-editor by Bradley Ayers and continued by Julien Palard et al.This is another fork by Florian Demmer; Compare changelog and source to decide whether you need the changes or better use upstream.Usagefromdjangoimportformsfromdjango_aceimportAceWidgetclassEditorForm(forms.Form):text=forms.CharField(widget=AceWidget)Syntax highlighting and static analysis can be enabled by specifying the
language:classEditorForm(forms.Form):text=forms.CharField(widget=AceWidget(mode='css'))Themes are also supported:classEditorForm(forms.Form):text=forms.CharField(widget=AceWidget(mode='css',theme='twilight'))To deactivate the syntax checker completely, disable the Web Worker:classEditorForm(forms.Form):text=forms.CharField(widget=AceWidget(mode='css',theme='twilight',use_worker=False))All options, and their default values, are:classEditorForm(forms.Form):text=forms.CharField(widget=AceWidget(mode=None,# try for example "python"theme=None,# try for example "twilight"use_worker=True,wordwrap=False,width="500px",height="300px",minlines=None,maxlines=None,showprintmargin=True,showinvisibles=False,usesofttabs=True,tabsize=None,fontsize=None,toolbar=True,readonly=False,showgutter=True,# To hide/show line numbersbehaviours=True,# To disable auto-append of quote when quotes are entered))InstallationInstall using pip:pipinstalldjango_aceUpdateINSTALLED_APPS:INSTALLED_APPS=(# ...'django_ace',)Example ProjectThere’s an example project included in the source, to try it do:# install in virtualenvcdexample/virtualenv.env..env/bin/activatepipinstall-e..# prepare sqlite database./manage.pymakemigrationsapp./manage.pymigrate# user for admin access./manage.pycreatesuperuser# run dev-server./manage.pyrunserverThen browser tohttp://localhost:8000orhttp://localhost:8000/admin.Change logv2.2.1Update Ace editor to version v1.32.3Expose extensions, contributed by @okaycj in upstream v1.32.0v2.1.0Update Ace editor to version v1.31.2Add CSS to work with admin changes in Django 4.2.
Now you can usewidth=”100%”without breaking the layout.
(Anh Tran <anhtran.sky@gmail.com> in upstream v1.15.4)Replace flake8 with ruffv2.0.0Update Ace editor to version v1.10.1 and use minified buildGeneral cleanup and modernization of codeUpdate example with widget inTabularInlineUpdate packaging by Julien PalardPython >= 3.6 is requiredv1.1.0Rewrite ofinit()function to support admin inline-formsNew widget optionuse_workerUse template engine to generate widget HTMLRewrite of boolean data attributesAdd tests, update example with admin integrationLast release supporting Python 2.7v1.0.11Support Grappelli inlines.v1.0.10FIX JavaScript error when usingJavaScriptCatalog.v1.0.9New widget optionshowguttersto hide line numbers.New widget optionbehavioursto avoid auto-insert of quotes.v1.0.8New widget optionreadonly.Update ACE editor to version v1.4.12.v1.0.7New widget optiontoolbar.Update ACE editor to version v1.4.8.v1.0.6New widget optionfontsize.Update ACE editor to version v1.4.7.v1.0.5New widget optiontabsize.Upgrade ACE editor to version v1.4.2.v1.0.4Update Django compatibility to>1.11,<=2.1New widget optionsminLines,maxLines,showinvisibles,usesofttabs.Upgrade ACE editor to version v1.4.0.Updated example for Django 1.11PEP8 improvementsv1.0.2Upgrade ACE editor to version 1.1.8Add support for showprintmarginv1.0.1Add support for Django 1.7 by removing deprecated imports.v1.0.0Initial release.