Tag each page on your website with an indicator text or image
Project description
Django site tag
Django site tag allows you to set 'tags' on each page of your website to indicate current environment, developemnt stages, or whatever else you may want to use such a feature for.
Installation
pip install git+https://github.com/yudori/django-site-tag.git
Setup
After installation, add the django_site_tag app name to the list of installed apps.
INSTALLED_APPS = [
... # django apps
'django_site_tag',
... # custom apps
]
Add the site tag middleware to the middleware list.
MIDDLEWARE = [
... # django middleware list
'django_site_tag.middleware.SiteTagMiddleware',
... # custom middleware list
]
Customization
Customization options are provided via django settings. Set any of the following values to add customizations to your site tags.
| Setting Name | Type | Description | Example Value |
|---|---|---|---|
SITE_TAG_POSITION |
string | space-separated css position values in the order: top, right, bottom ,left representing the position of the site tag | '15px 0px 0px 15px' |
SITE_TAG_TEXT |
string | The text to be written on the tag | 'TEST' |
SITE_TAG_TEXT_STYLE |
string | The css style to be applied to the text | 'padding: 10px;' |
SITE_TAG_TEXT_BORDER_STYLE |
string | The css style to be applied to the border around the text | '2px dashed #ff0000;' |
SITE_TAG_IMAGE |
string | The url to the image file to be used instead of text | '/static/images/tag.jpg' |
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-site-tag-0.0.1.tar.gz.
File metadata
- Download URL: django-site-tag-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f53bca2ba57e81b51316154924ca6eccd3cb5d3e72c4ab626f1ae05e1d997f21
|
|
| MD5 |
6565cf77190060108fb0813816166e52
|
|
| BLAKE2b-256 |
2fc0b12341021e5a6a121b576ec21adfcc74c32e1c05d8fdb0e6c185eb50309c
|
File details
Details for the file django_site_tag-0.0.1-py3-none-any.whl.
File metadata
- Download URL: django_site_tag-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98c932aae8bdc34ad7370dbbd55514ec16b602710cac37c57c33a4748f870e1c
|
|
| MD5 |
f7e701a7f4f5f6beb635b5ed60d8be1e
|
|
| BLAKE2b-256 |
3538dda25f85272f163750e6b6d75db996bd2d3f55026383da0359442dc5ede3
|