Skip to content

Commit

Permalink
docs(eav): update documentation for Django EAV 2 admin integration an…
Browse files Browse the repository at this point in the history
…d settings
  • Loading branch information
Dresdn committed Mar 6, 2024
1 parent 93c434b commit 2d7b06c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ We follow [Semantic Versions](https://semver.org/) starting at the `0.14.0` rele
## {{ Next Version }}

### Bug Fixes

- Corrects `BaseEntityAdmin` integration into Django Admin site

### Features

## 1.5.0 (2023-11-08)
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'eav',
],
SECRET_KEY=os.environ.get('DJANGO_SECRET_KEY', 'this-is-not-s3cur3'),
EAV2_PRIMARY_KEY_FIELD="django.db.models.BigAutoField",
)

# Call django.setup to load installed apps and other stuff.
Expand Down
14 changes: 12 additions & 2 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,10 @@ You can use ``Q`` expressions too:
Admin Integration
-----------------
Django EAV 2 includes integration for Django's admin. As usual, you need to
register your model first:
Django EAV 2 seamlessly integrates with Django's admin interface by providing
dynamic attribute management directly within the admin panel. This feature
provides the EAV Attributes as a separate fieldset, whether use the base
fieldset or when providing your own.
.. code-block:: python
Expand All @@ -302,3 +304,11 @@ register your model first:
form = PatientAdminForm
admin.site.register(Patient, PatientAdmin)
Customizing the EAV Fieldset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Django EAV 2 integration allows you to customize the presentation of EAV
attributes in the admin interface through the use of a dedicated fieldset. You
can configure this fieldset by setting ``eav_fieldset_title`` and
``eav_fieldset_description`` within your admin class.

0 comments on commit 2d7b06c

Please sign in to comment.