A simple Django app to support Notifications.
Project description
Notifications is a simple Django app to serve notifications to your users.
To start:
` pip install trackwell-notifications `
Quick start
pip install trackwell-notifications
Add “notifications” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'notifications', ]
Make sure it is after the auth etc.:
MIDDLEWARE_CLASSES = ( ... 'notifications.middleware.NotificationMiddleware', )
Put the js and css imports in your base template where you want things to pop up
<script type=”text/javascript” src=”{% static “notifications/Notifications.js” %}”></script> <link rel=”stylesheet” href=”{% static “css/notifications.css” %}” type=”text/css” />
Include the polls URLconf in your project urls.py like this:
path('notifications/', include('notifications.urls')),
Register the api
from notifications.api.views import NotificationViewSet from notifications.api.views import UserNotificationViewSet
router.register(r’users’, UserViewSet) router.register(r’^users_in_groups’, UsersInGroupsViewSet, ‘Users in groups’)
Run python manage.py migrate to create the notifications models.
Start the development server and visit http://127.0.0.1:8000/admin/notifications
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 trackwell-notifications-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4781e9b3afea912fadfbc0c21f514a586f3caec865cab2e7c9903d5a8f7c5185 |
|
MD5 | d5cf8dfd3d3382df88c34aac06526f68 |
|
BLAKE2b-256 | 3699b95327e318e6e49e51f279fa2551e1de1af2c8b48d9c4d88279c69f55a1a |
Hashes for trackwell_notifications-1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8229f12943303af5a5ab3e5ea70d0a2c25dc3d666f1f26bba7d6461708b76368 |
|
MD5 | 9df7606a5367f29de00478ef3d99a661 |
|
BLAKE2b-256 | ea1bc5a4f0caba289f8a0153617ae6d6da3c9e3c7e420a6200aba071cad4e938 |