Registry /
web-framework / djangocms-attributes-field
Install & Compatibility
Where this runs
tested against v4.1.2 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.616s · 88.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.0s · import 0.634s · 89MB
93MB installed
● package 93MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AttributesField
✓ from djangocms_attributes_field.fields import AttributesField
✗ from djangocms_attributes_field import AttributesField
The module is 'fields' not the top-level package
AttributesFormField
✓ from djangocms_attributes_field.fields import AttributesFormField
✗ from djangocms_attributes_field.forms import AttributesFormField
There is no 'forms' module; form field is also in 'fields'
Basic model with AttributesField including default and example usage.
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings')
import django
from django.conf import settings
settings.configure(
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}},
INSTALLED_APPS=['djangocms_attributes_field'],
DEFAULT_AUTO_FIELD='django.db.models.BigAutoField',
)
django.setup()
from django.db import models
from djangocms_attributes_field.fields import AttributesField
class MyModel(models.Model):
attributes = AttributesField(blank=True, default=dict)
# Save and retrieve
instance = MyModel.objects.create(attributes={'class': 'my-class', 'data-id': '42'})
print(instance.attributes)
Errors
Common errors & fixes
ImportError: cannot import name 'AttributesField' from 'djangocms_attributes_field'
Incorrect import path; the class is in the 'fields' submodule.
fixUse: from djangocms_attributes_field.fields import AttributesField
django.core.exceptions.ImproperlyConfigured: 'djangocms_attributes_field' is not a valid Django app
Missing 'djangocms_attributes_field' in INSTALLED_APPS.
fixAdd 'djangocms_attributes_field' to your INSTALLED_APPS setting.
Upgrade
Version history
4.1.2latest on PyPI · released Nov 2, 2025
Audit
Dependencies
djangorequiredRequired by the field
django-cmsoptionalOptional, needed for integration with django CMS