This release is a pre-release and may not be stable for production use.
Wagtail CRX (CodeRed) Settings Override
Overrides of default Wagtail CRX settings, eg. navbars, footers, etc.
Quick start
-
Install the package from PyPi:
pip install crx-settings-override -
Add "crx_settings_override" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ..., "crx_settings_override", ]
-
Add "crx_settings_override.context_processors.navbars" and "crx_settings_override.context_processors.footers" to your TEMPLATES settings like this::
TEMPLATES = [ { ..., "OPTIONS": { "context_processors": [ ..., "crx_settings_override.context_processors.navbars", "crx_settings_override.context_processors.footers" ], "loaders": [...] }, }, ] -
To make translations work for navbars, override navbar template of CodeRed by creating /templates/coderedcms/snippets/navbar.html and change
{% if settings.coderedcms.LayoutSettings.site_navbar %} {% get_navbars as navbars %} {% for navbar in navbars %} <ul class="navbar-nav {{navbar.custom_css_class}}" {% if navbar.custom_id %}id="{{navbar.custom_id}}" {% endif %}> {% for item in navbar.menu_items %} {% include_block item with liclass="nav-item" aclass="nav-link" ga_event_category="Navbar" %} {% endfor %} </ul> {% endfor %} {% endif %}so it doesn't use site_navbar and get_navbars method (this is overriden by the context_processor), eg. simply erase those lines like this
{% for navbar in navbars %} <div> <ul class="navbar-nav flex-wrap justify-content-around"> {% for item in navbar.menu_items %} {% include_block item with liclass="nav-item fs-5" aclass="nav-link" ga_event_category="Navbar" %} {% endfor %} </ul> </div> {% endfor %} -
Run
python manage.py migrateto create the models. -
Start the development server and visit the admin to:
- create localized navbars under Snippets > Translatable Navigation Bars
- set one of the localized navbar as a site navigation in CRX Settings Overrides.
-
Navigation switches automatically based on current site localization.
Development
Update semantic version of the package
Run test update without commiting
$ bumpver update --patch(--minor|--major) --dry
Run update and commit the changes to the repo
$ bumpver update --patch(--minor|--major)
Metadata
Release files for crx-settings-override 1.0.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crx-settings-override-1.0.0b0.tar.gz | 8.0 kB | Without provenance | Details for crx-settings-override-1.0.0b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crx_settings_override-1.0.0b0-py3-none-any.whl | Python 3 | none | any | Details for crx_settings_override-1.0.0b0-py3-none-any.whl |
Total release size: 18.0 kB
Release files / crx-settings-override-1.0.0b0.tar.gz
| Download URL | crx-settings-override-1.0.0b0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de4b091d43eb17db395ceabb5b56bf3a4bafcc33397b9a83498aaa3de3c2305a
|
|
BLAKE2b-256 checksum How to use checksums |
636bea1a78a2ac84abfdae79bea9e1625ef6472a286b8e501b2069e7bb10ae8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Release files / crx_settings_override-1.0.0b0-py3-none-any.whl
| Download URL | crx_settings_override-1.0.0b0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53593e3859a351958704ceb535a73911dd6d3ddc0ace11c761fd704ff350c3c1
|
|
BLAKE2b-256 checksum How to use checksums |
cb8ba503f0bd0c8e1a77b3ffd4b0f04bbd97cb7f574b9dd56331b032a44a9aa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Security for crx-settings-override 1.0.0b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.