Templatetag to render footer in Django admin.
Project description
django-admin-footer provides a templatetag that renders a footer with version information in the Django admin.
Installation
Use pip to install the download and install the package from PyPi:
pip install django-admin-footer
Or checkout the source code from Github:
git clone https://github.com/collab-project/django-admin-footer.git cd django-admin-footer pip install -e .
Add admin_footer to INSTALLED_APPS in your Django project settings:
INSTALLED_APPS = (
...
'admin_footer',
)
Usage
The ADMIN_FOOTER_DATA settings dict provides the data used in your footer. The default template expects the following template vars: site_url, site_name, period and version.
For example in settings.py:
from datetime import datetime
from myapp import version
ADMIN_FOOTER_DATA = {
'site_url': 'https://www.google.com',
'site_name': 'Google',
'period': '{}'.format(datetime.now().year),
'version': 'v{} - '.format(version)
}
Load the tag in your admin template (e.g. admin/base.html):
{% load footer %}
And add the admin_footer tag to the footer block:
{% block footer %}
{% admin_footer %}
{% endblock %}
You’ll now see a copyright link at the bottom of the admin pages. The version information is hidden for non-staff users.
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-admin-footer-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b073a7a0da0f45d95a14ea87a5a281ee61c816b32a9bcd1100f4fdab743b54e4 |
|
MD5 | a565e6babede52bd3d0235ea5dc579e3 |
|
BLAKE2b-256 | 2fcb95e7461d56de72a30b0112af1fa77037b8d8866ad565a9f88fc174c91050 |
Hashes for django_admin_footer-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d1155315b9691db4edfc7f4f1afc50238f5b4c68e2922af62722bdb78c2be2 |
|
MD5 | d7f45a8af90607660ce812ab6d18a8f9 |
|
BLAKE2b-256 | 23af1cd67d135adc66f8a20cb4526021012c6961f748190b0e9037e5fc791331 |