A small Django app that displays temporary, short broadcasts across a site.
Project description
The site broadcast application allows users to define short messages and announcements that should be displayed across a site.
Each broadcast message consists of a short message, an optional start time, and a completion time, when the should be displayed across a site.
Installation
Use pip:
pip install django-site-broadcasts
Or clone the repository and use the setup.py file to install the application.
python setup.py install
Then add broadcasts to your INSTALLED_APPS and broadcasts.context_processors.broadcast_message to TEMPLATE_CONTEXT_PROCESSORS.
Usage
If you’ve added the context processor to your list of context processors, you can simply refer to the current message using the context variable:
{{ broadcast_message }}
The message itself should be displayed with:
{{ broadcast_message.message }}
TO-DO
- Handle time zones (Django project timezone may differ from server timezone)
- Use caching (if available)
History
0.1.1
- Fix an installation bug
0.1.0
- Django 1.7+ compatibility (moved South migrations module to south_migrations and added native Django migrations module - thanks to @smajda for that)
0.0.1
- First release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size django_site_broadcasts-0.2.0-py2.py3-none-any.whl (6.8 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size django-site-broadcasts-0.2.0.tar.gz (4.4 kB) | File type Source | Python version None | Upload date | Hashes View |
Hashes for django_site_broadcasts-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad1e0010594dbfa30e010c2dd9bfddc4211dc2c15656c21dbd8c9a92cbb1bb78 |
|
MD5 | 287bb6bf644988cd640a2ae373007d45 |
|
BLAKE2-256 | 4b5cca2c2fbfe87fec64250dfac53b28276c00d80e1d22ee85033b17d60095fe |
Hashes for django-site-broadcasts-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e38eeb6de74bee087f776e08bd8e0280d6e3c34979e78d250e9f45c85c4138 |
|
MD5 | 615f3237a84f98fcff932cc84b6bbd61 |
|
BLAKE2-256 | e02471e34637abbf1a1138666868e7b3419c0de8d29cdb4e57a4d4c6cf90f0b7 |