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'
Rather than using an internal namespace, you can also set PROJECT_HOME_NAMESPACE to a specific URL:
PROJECT_HOME_NAMESPACE = 'djangoproject.com'
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.1 2018-12-09
Don’t modify home_namespace globally
Exclude .pyc files from distribution
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
Metadata
Release files for django-project-home-templatetags 0.2.1
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 |
|---|---|---|---|---|
| django-project-home-templatetags-0.2.1.tar.gz | 5.3 kB | Without provenance | Details for django-project-home-templatetags-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_project_home_templatetags-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_project_home_templatetags-0.2.1-py2.py3-none-any.whl |
Total release size: 11.1 kB
Security for django-project-home-templatetags 0.2.1
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.