Registry / web-framework / django-ace

django-ace

JSON →
library1.44.0pypypi✓ verified 86d ago

django-ace provides a Django form widget for embedding the ACE code editor. Current version 1.43.5 (bundles ACE v1.43.5). Release cadence follows ACE upstream releases.

pip install django-ace
INSTALL
IMPORT
SIG · DJANGO-ACE
D
django-ace
web-frameworkpythonv1.44.0
Install
3.6s avg
Import
607ms
Disk
77MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.44.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.642s · 78MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.6s · import 0.572s · 78MB
77MB installed
● package 77MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AceWidget
from django_ace import AceWidget
from ace import AceWidget
The package is installed as django-ace but the module is django_ace.
AceMixin
from django_ace import AceMixin

Basic usage: use AceWidget as a form field widget. Set width/height to None to use CSS defaults.

from django_ace import AceWidget from django import forms # In your form class: code = forms.CharField(widget=AceWidget( mode='python', theme='monokai', width=None, height=None, wordwrap=True ))
Debug
Known issues
breakingIn v1.38.0, default width and height changed from '500px'/'300px' to None. If you relied on defaults, your editor may collapse to zero size.
fix
Explicitly set width and height as strings (e.g., width='500px', height='300px') or provide CSS.
affects: >=1.38.0
gotchaThe pip package name is django-ace but Python imports use django_ace (underscore).
fix
Use 'from django_ace import AceWidget' not 'from ace' or 'from djangoace'.
affects: all
deprecatedUsing width/height as positional arguments is deprecated in favor of keyword arguments.
fix
Always pass width and height as keyword arguments.
affects: >=1.38.0
gotchaACE editor is loaded from CDN by default. If you need offline use, you must configure static files or use a custom build.
fix
Set ace_use_cdn=False and ensure static files are collected.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'django_ace'
Installed package as django-ace but tried to import as django_ace incorrectly.
fix
Ensure you have installed django-ace (pip install django-ace) and use correct import: 'from django_ace import AceWidget'.
AttributeError: 'AceWidget' object has no attribute 'render'
Using an older version where AceWidget might not be compatible with Django version or widget API changed.
fix
Upgrade django-ace: pip install --upgrade django-ace
The editor shows a blank box with no text area
Width and height not set (defaulted to None) and no CSS providing dimensions.
fix
Explicitly set widget dimensions: AceWidget(width='500px', height='300px')
Upgrade
Version history
1.44.0latest on PyPI · released May 14, 2026
Audit
Dependencies
DjangorequiredRequired for form widget integration
Agent activity
2 hits · last 30 days
node
2
Resources
django-ace — pip install django-ace · libregistry