mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Documentation changes for Ordered fields in admin
This commit is contained in:
parent
7e20386682
commit
b9eb800a91
1 changed files with 17 additions and 1 deletions
|
|
@ -118,8 +118,24 @@ 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'),
|
||||
}
|
||||
|
||||
Ordered Fields in admin
|
||||
-----------------------
|
||||
|
||||
In order to Order the fields , you can use OrderedDict collection. Here is an example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
CONSTANCE_CONFIG = OrderedDict([
|
||||
('SITE_NAME', ('My Title', 'Website title')),
|
||||
('SITE_DESCRIPTION', ('', 'Website description')),
|
||||
('THEME', ('light-blue', 'Website theme')),
|
||||
]
|
||||
|
||||
|
||||
Fieldsets
|
||||
-------------
|
||||
---------
|
||||
|
||||
To group settings together you can define fieldsets. Here's an example:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue