django-ace
django-ace provides of ACE editor with Django
What it is and what it does
django-ace wraps the ACE code editor as a Django form widget, letting you replace plain text fields with a full-featured code editor in forms and the Django admin. It exposes ACE's core features—syntax highlighting by language mode, color themes, line numbers, word wrap, and code completion—as widget constructor options. The widget integrates cleanly into Django's form system and works in both regular forms and ModelForms.
The package bundles ACE editor resources and handles the JavaScript initialization automatically. You configure the editor by passing options like mode (language), theme, and display settings to the AceWidget constructor. It has been actively maintained to track ACE releases and includes CSS updates for compatibility with Django admin layouts.
Use it for:
- Add syntax-highlighted code editing to Django admin for fields storing code snippets, SQL, or configuration.
- Build a custom code review or documentation tool where users edit markdown or code in a form with live syntax highlighting.
- Create a configuration management interface where administrators edit YAML, JSON, or Python code with theme and editor preferences.
- Embed a code editor in a user-facing Django form for a code submission or snippet-sharing application.
- Replace plain textarea fields in technical forms (e.g., CSS, HTML templates) with a proper editor that shows line numbers and indentation guides.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates the ACE code editor into Django forms as a widget, providing syntax highlighting, themes, and code editing features for text fields.
Yes. django-ace is a straightforward, low-friction widget that solves a real problem—adding a proper code editor to Django forms. It has no security vulnerabilities, is actively maintained, and depends only on Django. Install it if you need syntax highlighting and code editing in a Django form or admin interface.
Install
django-ace on PyPI
pip
pip install django-aceuv
uv add django-acepoetry
poetry add django-aceInstalling django-ace
Before you install
Low friction install with a single runtime dependency (Django). The package is actively maintained with a recent release and no known vulnerabilities.
License in practice
BSD-2-Clause is a permissive license that allows commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices.
Quickstart
pip install django-ace
from django import forms
from django_ace import AceWidget
class EditorForm(forms.Form):
text = forms.CharField(widget=AceWidget(mode='python', theme='twilight'))
Requires Django to be installed and configured; the widget renders in the browser and requires JavaScript support.
Verify before relying
- Whether the ACE editor version bundled (v1.44.0) includes all current language modes and themes available in upstream ACE.
- Performance characteristics when handling very large code documents or with many simultaneous editor instances.
- Compatibility with modern Content Security Policy (CSP) configurations beyond the useStrictCSP option mentioned.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>2) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Django |
| Maintenance | actively maintained — 92 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 161,459/month — #10,630 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_ace-1.44.0-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
django-json-widgetProvides a rich JSON editor widget for Django's…
permissive · top 5,000 on PyPI
django-summernoteEmbeds the Summernote WYSIWYG editor into…
permissive · top 15,000 on PyPI
qtmonacoEmbeds the Monaco Editor (VS Code's editor)…
unclear · top 15,000 on PyPI
streamlit-aceEmbeds an Ace code editor component into…
permissive · top 15,000 on PyPI
django-ckeditorIntegrates CKEditor 4.18.0 rich-text editing…
permissive · top 5,000 on PyPI
django-navhelperProvides Django template tags to automatically…
permissive · top 15,000 on PyPI
django-js-assetAdds script, stylesheet, and JSON tags with…
permissive · top 5,000 on PyPI
django-jsonformProvides a user-friendly JSON editing form…
permissive · top 15,000 on PyPI
django-tinymcedjango-tinymce provides a Django form widget…
copyleft · top 5,000 on PyPI
django-permissionedformsExtends Django's forms framework to…
permissive · top 5,000 on PyPI