<commit_before>Config file
===========

Options available in settings.py:

JET_DEFAULT_THEME
-----------------

Django JET allows you to change default theme. This feature is mainly used for customizing color schemes rather than
making absolutely different themes. This option in fact make Django load different css styles.

Possible built-in themes are:

* default
* green
* light-violet
* light-green
* light-blue
* light-gray

To change theme use parameter:

.. code:: python

    JET_DEFAULT_THEME = 'light-gray'

JET_THEMES
----------

.. image:: _static/themes.png
    :width: 100%

You can allow your users to change admin panel color scheme. This option will add color scheme chooser to the user dropdown menu. Make ``JET_THEMES`` an empty list to disable this feature.

.. code:: python

    JET_THEMES = [
        {
            'theme': 'default', # theme folder name
            'color': '#47bac1', # color of the theme's button in user menu
            'title': 'Default' # theme title
        },
        {
            'theme': 'green',
            'color': '#44b78b',
            'title': 'Green'
        },
        {
            'theme': 'light-green',
            'color': '#2faa60',
            'title': 'Light Green'
        },
        {
            'theme': 'light-violet',
            'color': '#a464c4',
            'title': 'Light Violet'
        },
        {
            'theme': 'light-blue',
            'color': '#5EADDE',
            'title': 'Light Blue'
        },
        {
            'theme': 'light-gray',
            'color': '#222',
            'title': 'Light Gray'
        }
    ]

CUSTOM JET_THEME
----------------

You are free to add your own color schemes by adding new folder to **/static/jet/css/themes/**.
You can use **/jet/static/jet/css/themes/light-violet/** folder as an example (available in Django JET repository).
_variables.scss contains **all** customizable variables. You'll have to compile all .scss files in theme directory
to start using your own theme.

COMPACT MENU
------------

.. image:: _static/side_menu_compact.png
    :width: 100%

If you don't have a lot of apps and models it can be annoying to have a two-level menu.
In this case you can use menu's compact mode, which will list applications and models in the side menu without need
to move pointer over applications to show models.

.. code:: python

    JET_SIDE_MENU_COMPACT = True

Default is ``False``

CUSTOM MENU
-----------

By default JET displays all applications and it models in the side menu in the alphabetical order.
To display applications and models you want or to change their order you can use ``JET_SIDE_MENU_CUSTOM_APPS`` setting.

.. code:: python

    JET_SIDE_MENU_CUSTOM_APPS = [
        ('core', [ # Each list element is a tuple with application name (app_label) and list of models
            'User',
            'MenuItem',
            'Block',
        ]),
        ('shops', [
            'Shop',
            'City',
            'MetroStation',
        ]),
        ('feedback', [
            'Feedback',
        ]),
    ]

If want to show all application's models use ``__all__`` keyword.

.. code:: python

    JET_SIDE_MENU_CUSTOM_APPS = [
        ('core', ['__all__']),
        ...
    ]

If have multiple admin sites and you want to specify different menu applications for each admin site, wrap menu lists
in dictionary with admin site names as keys:

.. code:: python

    JET_SIDE_MENU_CUSTOM_APPS = {
        'admin': [
            ('core', ['__all__']),
            ...
        ],
        'custom_admin': [
            ('custom_admin_app', [
                'CustomAdminAppModel',
            ]),
            ...
        ]
    }

.. note::

    You can use ``jet_custom_apps_example`` management command to generate example ``JET_SIDE_MENU_CUSTOM_APPS``
    setting which includes all your applications and models. You can use it this way:

    .. code:: python

        python manage.py jet_custom_apps_example

JET_CHANGE_FORM_SIBLING_LINKS
-----------------------------

.. image:: _static/change_form_sibling_links.png
    :width: 100%

Adds buttons to change forms that allows you to navigate to previous/next object without returning back to change list.
Can be disabled if hit performance.
<commit_msg>Update documentation<commit_after>Config file
===========

Options available in settings.py:

JET_DEFAULT_THEME
-----------------

Django JET allows you to change default theme. This feature is mainly used for customizing color schemes rather than
making absolutely different themes. This option in fact make Django load different css styles.

Possible built-in themes are:

* default
* green
* light-violet
* light-green
* light-blue
* light-gray

To change theme use parameter:

.. code:: python

    JET_DEFAULT_THEME = 'light-gray'

JET_THEMES
----------

.. image:: _static/themes.png
    :width: 100%

You can allow your users to change admin panel color scheme. This option will add color scheme chooser to the user dropdown menu. Make ``JET_THEMES`` an empty list to disable this feature.

.. code:: python

    JET_THEMES = [
        {
            'theme': 'default', # theme folder name
            'color': '#47bac1', # color of the theme's button in user menu
            'title': 'Default' # theme title
        },
        {
            'theme': 'green',
            'color': '#44b78b',
            'title': 'Green'
        },
        {
            'theme': 'light-green',
            'color': '#2faa60',
            'title': 'Light Green'
        },
        {
            'theme': 'light-violet',
            'color': '#a464c4',
            'title': 'Light Violet'
        },
        {
            'theme': 'light-blue',
            'color': '#5EADDE',
            'title': 'Light Blue'
        },
        {
            'theme': 'light-gray',
            'color': '#222',
            'title': 'Light Gray'
        }
    ]

CUSTOM JET_THEME
----------------

You are free to add your own color schemes by adding new folder to **/static/jet/css/themes/**.
You can use **/jet/static/jet/css/themes/light-violet/** folder as an example (available in Django JET repository).
_variables.scss contains **all** customizable variables. You'll have to compile all .scss files in theme directory
to start using your own theme.

COMPACT MENU
------------

.. image:: _static/side_menu_compact.png
    :width: 100%

If you don't have a lot of apps and models it can be annoying to have a two-level menu.
In this case you can use menu's compact mode, which will list applications and models in the side menu without need
to move pointer over applications to show models.

.. code:: python

    JET_SIDE_MENU_COMPACT = True

Default is ``False``

CUSTOM MENU
-----------

By default JET displays all applications and it models in the side menu in the alphabetical order.
To display applications and models you want or to change their order you can use ``JET_SIDE_MENU_ITEMS`` setting.

.. code:: python

    JET_SIDE_MENU_ITEMS = [  # A list of application or custom dicts
        {'label': _('General'), 'app_label': 'core', 'models': [
            {'name': 'help.question'},
            {'name': 'pages.page'},
            {'name': 'city'},
            {'name': 'validationcode'},
        ]},
        {'label': _('Users'), 'models': [
            {'name': 'core.user'},
            {'name': 'auth.group'},
            {'name': 'core.userprofile'},
        ]},
        {'app_label': 'banners', 'models': [
            {'name': 'banner'},
            {'name': 'bannertype'},
        ]},
        {'app_label': 'talks', 'models': [
            {'name': 'talk'},
            {'name': 'talkmessage'},
        ]},
    ]

.. deprecated:: 1.0.6

    Old way of customizing menu items via `JET_SIDE_MENU_CUSTOM_APPS` setting is now deprecated in favor
    of new `JET_SIDE_MENU_ITEMS` setting.

    .. code:: python

        JET_SIDE_MENU_CUSTOM_APPS = [
            ('core', [ # Each list element is a tuple with application name (app_label) and list of models
                'User',
                'MenuItem',
                'Block',
            ]),
            ('shops', [
                'Shop',
                'City',
                'MetroStation',
            ]),
            ('feedback', [
                'Feedback',
            ]),
        ]

If have multiple admin sites and you want to specify different menu applications for each admin site, wrap menu lists
in dictionary with admin site names as keys:

.. code:: python

    JET_SIDE_MENU_ITEMS = {
        'admin': [
            {'label': _('General'), 'app_label': 'core', 'models': [
                {'name': 'help.question'},
                {'name': 'pages.page'},
                {'name': 'city'},
                {'name': 'validationcode'},
            ]},
            ...
        ],
        'custom_admin': [
            {'app_label': 'talks', 'models': [
                {'name': 'talk'},
                {'name': 'talkmessage'},
            ]},
            ...
        ]
    }

.. note::

    You can use ``jet_side_menu_items_example`` management command to generate example ``JET_SIDE_MENU_ITEMS``
    setting which includes all your applications and models. You can use it this way:

    .. code:: python

        python manage.py jet_side_menu_items_example

JET_CHANGE_FORM_SIBLING_LINKS
-----------------------------

.. image:: _static/change_form_sibling_links.png
    :width: 100%

Adds buttons to change forms that allows you to navigate to previous/next object without returning back to change list.
Can be disabled if hit performance.

{'fraction_non_alphanumeric': 0.1299582463465553, 'fraction_numerical': 0.0059498956158663885, 'mean_word_length': 2.028128950695322, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7420164', 'n_tokens_mistral': 2796, 'n_tokens_neox': 2693, 'n_words': 946}