{"id":21133,"library":"django-ace","title":"Django ACE","description":"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.","status":"active","version":"1.43.5","language":"python","source_language":"en","source_url":"https://github.com/django-ace/django-ace","tags":["django","ace-editor","widget","code-editor"],"install":[{"cmd":"pip install django-ace","lang":"bash","label":"install"}],"dependencies":[{"reason":"Required for form widget integration","package":"Django","optional":false}],"imports":[{"note":"The package is installed as django-ace but the module is django_ace.","wrong":"from ace import AceWidget","symbol":"AceWidget","correct":"from django_ace import AceWidget"},{"note":"","symbol":"AceMixin","correct":"from django_ace import AceMixin"}],"quickstart":{"code":"from django_ace import AceWidget\nfrom django import forms\n\n# In your form class:\ncode = forms.CharField(widget=AceWidget(\n    mode='python',\n    theme='monokai',\n    width=None,\n    height=None,\n    wordwrap=True\n))","lang":"python","description":"Basic usage: use AceWidget as a form field widget. Set width/height to None to use CSS defaults."},"warnings":[{"fix":"Explicitly set width and height as strings (e.g., width='500px', height='300px') or provide CSS.","message":"In 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.","severity":"breaking","affected_versions":">=1.38.0"},{"fix":"Use 'from django_ace import AceWidget' not 'from ace' or 'from djangoace'.","message":"The pip package name is django-ace but Python imports use django_ace (underscore).","severity":"gotcha","affected_versions":"all"},{"fix":"Always pass width and height as keyword arguments.","message":"Using width/height as positional arguments is deprecated in favor of keyword arguments.","severity":"deprecated","affected_versions":">=1.38.0"},{"fix":"Set ace_use_cdn=False and ensure static files are collected.","message":"ACE editor is loaded from CDN by default. If you need offline use, you must configure static files or use a custom build.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure you have installed django-ace (pip install django-ace) and use correct import: 'from django_ace import AceWidget'.","cause":"Installed package as django-ace but tried to import as django_ace incorrectly.","error":"ModuleNotFoundError: No module named 'django_ace'"},{"fix":"Upgrade django-ace: pip install --upgrade django-ace","cause":"Using an older version where AceWidget might not be compatible with Django version or widget API changed.","error":"AttributeError: 'AceWidget' object has no attribute 'render'"},{"fix":"Explicitly set widget dimensions: AceWidget(width='500px', height='300px')","cause":"Width and height not set (defaulted to None) and no CSS providing dimensions.","error":"The editor shows a blank box with no text area"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}