Skip to main content

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

django-messages-display-0.3.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

django_messages_display-0.3.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file django-messages-display-0.3.0.tar.gz.

File metadata

File hashes

Hashes for django-messages-display-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ca10130bb730af9de43c7fcbe91a7391d96edf3006331e46a42d55a404ca8e27
MD5 537fd9ad833237193680c8dde41b9cb9
BLAKE2b-256 7cff0e65fe4667675adb3c97573903425271f934df0714a50d8113ff99c7e487

See more details on using hashes here.

File details

Details for the file django_messages_display-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_messages_display-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0816768e49f68853c1abd777c79c1c029121339d2f92678b8578d55a1d8e8b0
MD5 9a48fc772d684059d427c08b4025d887
BLAKE2b-256 6664b47c96d35a69daecbfdc465ac35b7b5c3ef56ace729622b8ae58e21ecd43

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page