mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Added documentation for fieldsets.
This commit is contained in:
parent
c8a06d3246
commit
4c21274342
1 changed files with 19 additions and 0 deletions
|
|
@ -118,6 +118,25 @@ Note: Use later evaluated strings instead of direct classes for the field and wi
|
|||
'MY_SELECT_KEY': ('yes', 'select yes or no', 'yes_no_null_select'),
|
||||
}
|
||||
|
||||
Fieldsets
|
||||
-------------
|
||||
|
||||
To group settings together you can define fieldsets. Here's an example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
CONSTANCE_CONFIG = {
|
||||
'SITE_NAME': ('My Title', 'Website title'),
|
||||
'SITE_DESCRIPTION': ('', 'Website description'),
|
||||
'THEME': ('light-blue', 'Website theme'),
|
||||
}
|
||||
|
||||
CONSTANCE_CONFIG_FIELDSETS = {
|
||||
'General Options': ('SITE_NAME', 'SITE_DESCRIPTION'),
|
||||
'Theme Options': ('THEME',),
|
||||
}
|
||||
.. image:: screenshot3.png
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue