Configuration ============= Djxi exposes several package settings that you can override in your project's settings.py. Reasonable defaults are provided. Key settings (defaults shown): - DX_HTMX_VERSION = "4" (choose between '2' and '4') - DX_HTMX_COMPRESSION = ".js" (or ".min.js") - DX_SECTION_TAG = "dx-section" - DX_INCLUDE_TAG = "dx-include" - DX_MESSAGE_CONTAINER_ID = "message-container" - DX_MESSAGE_SWAP_METHOD = "beforeend" - DX_MESSAGE_TEMPLATE = "djxi/messages/message_list.html" Example configuration in `settings.py`: .. code-block:: python DX_HTMX_VERSION = '4' DX_HTMX_COMPRESSION = '.min.js' DX_SECTION_TAG = 'dx-section' DX_INCLUDE_TAG = 'dx-include' The `djxi.conf.Settings` proxy (importable as `djxi.conf.package_settings`) will return these values from `django.conf.settings` if present, otherwise it will use the defaults defined by djxi. Templatetags ------------ - `{% htmx_script_inclusion %}`: includes the configured htmx CDN script and integrity attribute. - `{% htmx_headers %}`: sets block attributes for explicit inheritance when needed. - `{% flash_messages_inclusion %}`: renders the message container context for the message OOB swaps. To use the templatetags, load them in your base template and place them where appropriate (for example include `htmx_script_inclusion` in the ``). Example base template snippet: .. code-block:: html {% load djxi %} {% htmx_script_inclusion %} {% flash_messages_inclusion %} ...