mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-04-08 17:30:59 +00:00
docs(eav): update documentation for Django EAV 2 admin integration and settings
This commit is contained in:
parent
c5fdbd6964
commit
75804507ef
3 changed files with 16 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ settings.configure(
|
|||
'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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue