A collection of Django templatetags to flexibly incorporate links and breadcrumbs from app pages to the homepage of a project
Project description
django-project-home-templatetags is a collection of Django templatetags to flexibly incorporate links and breadcrumbs from app pages to the homepage of a project.
If PROJECT_HOME_NAMESPACE is not defined to settings.py, these template tags are silenced.
Source code is available on GitHub at mfcovington/django-project-home-templatetags.
Installation
PyPI
pip install django-project-home-templatetags
GitHub (development branch)
pip install git+http://github.com/mfcovington/django-project-home-templatetags.git@develop
Configuration
Add project_home_tags to INSTALLED_APPS in settings.py:
INSTALLED_APPS = (
...
'project_home_tags',
)
Specify the PROJECT_HOME_NAMESPACE in settings.py:
PROJECT_HOME_NAMESPACE = 'project_name:index_view'
By default, a link created with a project_home_tags template tag has ‘Home’ as its text. This can be overridden by defining an optional project-wide label with PROJECT_HOME_LABEL in settings.py:
PROJECT_HOME_LABEL = 'Homepage' # Optional; Default is 'Home'
Both the default and the project-wide label can be overridden by passing a string to the template tag. For example:
{% project_home_breadcrumb_bs4 'Custom Label' %}
Revision History
0.2.0 2018-12-08
Allow settings.PROJECT_HOME_NAMESPACE to be an actual URL, rather than just an internal namespace
0.1.0 2018-11-20
A collection of Django templatetags to flexibly incorporate links and breadcrumbs from app pages to the homepage of a project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-project-home-templatetags-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072343ccb2a7a79ab1f5f3f2eadccec40c2254e7b9bc2a2049e94786baa12866 |
|
MD5 | 141974bc7df03cb21874c2a43adbb4ed |
|
BLAKE2b-256 | 302a03ef16816d6d06ca774b2fcdb46776aa9a46e1e733d9b2bad201211f57e5 |
Hashes for django_project_home_templatetags-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a948b61d8d8602101586de76040e69be70eaaaf9292f174ec8ee33485606e0d5 |
|
MD5 | e37325052a0f880ec167a6c76dd3bdf8 |
|
BLAKE2b-256 | cd3c56be2585b285b20dffd39fec31aede23e394dc3ed91432b6d29f1d40e0b7 |