skillfed

django-ace

django-ace provides of ACE editor with Django

django-ace v1.44.0 161.5K downloads/30d#10,630 on PyPI148
Permissive license BSD-2-Clause Active released

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-ace

uv

uv add django-ace

poetry

poetry add django-ace

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python

Tags

django form code editor widgetace editor django integrationsyntax highlighting django formscode editor django admindjango text editor with themesace widget djangocode highlighting django forms
django-widgetcode-editorform-integration

More Dynamic Content packages