Django Gizmo
Django app allowing for configurable targetting of template inclusion tags.
Installation
Add gizmo to your INSTALLED APPS setting.
Add ROOT_GIZMOCONF value to your projects settings file. This specifies the module in which your configured your gizmos, i.e.:
ROOT_GIZMOCONF = 'project.gizmos'
In this case we have a module called project containing a gizmos.py file.
Create your gizmos config (in this cased named gizmos.py) file in the form:
gizmos = ( ('<loader name>', '<tag name>', '<slot name>', [['<url_name'>, ]]), )
With:
<loader name> being the name you would normally pass to Django’s load tag, i.e. myapp_inclusion_tags for {% load myapp_inclusion_tags %}.
<tag name> being the name of the tag you want to include, i.e. advert for {% advert %}.
<slot name> being the name of the slot you want the tag to show up in, i.e. home.
<url_name> optional being the names of the urls you want the tag to show up in, i.e. home.
Usage
Gizmos are stock standard Django inclusion tags. The only diffirence is that instead of specifying tags within a template you specify tags from a distance by using a gizmo conf file in conjunction with the gizmos tag.
For example, lets say we have an advert tag specified in myapp’s inclusion tags which we only want to call in the gizmo slot named advert for the url named home:
Create your tags as normal.
Create your gizmos config file in the form:
gizmos = ( ('myapp_inclusion_tag', 'advert', 'advert', ['home', ]), )In your template for the home view load the gizmo inclusion tags and include a gizmos tag with a slot name of advert:
{% load gizmo_inclusion_tags %} ...some html... {% gizmos 'home_advert' %} ...some more html...
Metadata
Release files for django-gizmo 0.0.4
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-gizmo-0.0.4.tar.gz | 6.1 kB | Without provenance | Details for django-gizmo-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_gizmo-0.0.4-py2.4.egg | Legacy Egg format | - | - | Details for django_gizmo-0.0.4-py2.4.egg |
Total release size: 18.9 kB
Release files / django-gizmo-0.0.4.tar.gz
| Download URL | django-gizmo-0.0.4.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
706a3ec6bd54327e8bae51a9d63be411b2c36f79e606176e7c72deec8b57e13a
|
|
BLAKE2b-256 checksum How to use checksums |
9ca31eafe87fcc155d16408133ec24d705bdf88439a554338013cd5c62600ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_gizmo-0.0.4-py2.4.egg
| Download URL | django_gizmo-0.0.4-py2.4.egg |
|---|---|
| Size | 12.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
4a07df5955e344dee2bc2acb91798375e199a871c5ad17d7b5e7e25a89471b39
|
|
BLAKE2b-256 checksum How to use checksums |
ce530d6541ac173eca4db787cd1dc5fa45ccd1d99b52f109a2df05710b1b5749
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-gizmo 0.0.4
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.