Display messages from django.contrib.messages as notifications in the browser.
Project description
django-messages-display
Display messages from django.contrib.messages as notifications in the browser.
The colors used for the notifications, meet the WCAG (2.1) AA contrast levels.
Setup
Install package using pip
:
python -m pip install django-messages-display
Add it to the installed apps:
INSTALLED_APPS = [
...
"django_messages_display",
...
]
How to use
Include the package template in templates where notifications are needed. If site-wide notifications apply for the whole site, it is convenient to add it to the base template, if there is one.
{% include 'django_messages_display/django_messages_display.html' %}
Further, for the styling to apply, the CSS should be loaded:
{% load static %}
...
<head>
...
<link rel="stylesheet" href="{% static 'django_messages_display/django_messages_display.css' %}">
</head>
Project details
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
Close
Hashes for django-messages-display-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e29e1edd1da31ad5bd09764e1c5d0ee54cfd319102958b2ec84f5987a8069e |
|
MD5 | 8beb3e8fba9be81911b4869486e00de5 |
|
BLAKE2b-256 | 82c6c1aec2e054687932fe4932ca3e702d3de56def28ad59ff715176390de3fb |
Close
Hashes for django_messages_display-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b746f86f4573c9733032db64f318a5f673acffc8e8ce7de6ea170db5a3103a |
|
MD5 | e169b73897c738cd6c1053ed2b391ce1 |
|
BLAKE2b-256 | 7a546a746290781a6742f69b8158b4d522baa68809c00d3d3826688aa4568bd9 |