Skip to main content

A simple Django app to support Notifications.

Project description

=============== Notifications

Notifications is a simple Django app to serve notifications to your users.

To start:

pip install trackwell-notifications

Quick start

  1. pip install trackwell-notifications

  2. 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',
)
  1. 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>
  2. Include the polls URLconf in your project urls.py like this::

    path('notifications/', include('notifications.urls')),

  3. 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')

  4. Run python manage.py migrate to create the notifications models.

  5. Start the development server and visit http://127.0.0.1:8000/admin/notifications

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

trackwell-notifications-4.0.0.tar.gz (23.0 kB view hashes)

Uploaded Source

Built Distribution

trackwell_notifications-4.0.0-py3-none-any.whl (30.4 kB view hashes)

Uploaded Python 3

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