django-webline-notifications is a python library, which allow you notify everything to user(s) simply
GPL-2.0 License
###Screen shot
###What is Django webline Notifications This is a django application to notify user about events. You can simply inform user about all kind of updates.
###Features
##How to install ###Downloading the package Probably the best way to install is by using PIP:
$ pip install django-webline-notifications
If you want to clone the main repository:
$ git clone https://github.com/alireza-molaee/django-webline-notifications.git
$ cd django-webline-notifications
$ python setup.py install
###install on django now you can add django-simple-notifications to the settings.py file:
INSTALLED_APPS = (
...
'webline_notifications',
'django.contrib.admin',
)
Then run migrations:
$ python manage.py migrate webline-notifications
Then collectstatic:
$ python manage.py collectstatic
now if run server you can see notifications in django admin:
$ python manage.py runserver
##Settings
you can limit archive notification for all user by WEBLINE_NOTIFICATIONS_LIMIT
default is False
it mean (no limit)
for example myproject.settings.py
:
...
WEBLINE_NOTIFICATIONS_LIMIT = 50
...
##Usage to notify every thing you want:
from webline_notification.model import Notification
Notification.send(
...
)
#####send option:
[obj, obj, ...]
'some one join us'
'fa-info'
'#c3c3c3'
'http://www.google.com/'
(optional)
you can use default color in Notification Notification.COLOR_DANGER
you can filter notification by color in django admin if you use default color
#####defult colors:
#####example:
from webline_notifications.models import Notification
from django.contrib.auth.models import User
user = User.objects.get(pk=1)
Notification.send(
[user],
'foo',
'fa-info',
Notification.COLOR_DANGER,
url='http://www.google.com/'
)
##TODO