Skip to main content

django-notifications-rest Documentation

django-notifications-rest provides rest endpoints for django-notifications-hq.

Requirements

  • Python 3.8 - 3.11
  • Django 4.2 - 5.0
  • django-notifications-hq latest version
  • djangorestframework latest version

Installation

Installation using pip. You need to manually install the required django-notifications-hq and djangorestframework packages.

$ pip install django-notifications-rest

or get it from source

$ git clone https://github.com/yhdelgado/django-notifications-rest.git
$ cd django-notifications-rest
$ python setup.py sdist
$ pip install dist/django-notifications-rest*

Then to add the Django Notifications Rest to your project add the app notifications_rest to your INSTALLED_APPS and urlconf.

The app should go somewhere after all the apps that are going to be generating notifications like django.contrib.auth

INSTALLED_APPS = (
    'django.contrib.auth',
    'rest_framework',
    'notifications'.
    ...
    'notifications_rest',
    ...
)

Add the notifications urls to your urlconf::

urlpatterns = [
    ...
    url('^notifications/', include('notifications_rest.urls')),
    ...
]

If the installed version of django>=3.1, then::

from django.urls import path, include
urlpatterns = [
    ...
    path('^notifications/', include('notifications_rest.urls')),
    ...
]

To run schema migration, execute python manage.py migrate.


Additional options:

There is also /add/ API endpoint to add new notifications. Such endpoint might be considered security risk, as any user can add any notifications. For that reason, it must be manually enabled by setting NOTIFICATIONS_API_ALLOW_ADD=True

django-notifications-rest Team

Core contributors (in alphabetical order):

Release files for django-notifications-rest 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-notifications-rest 1.0.2
File Size Uploaded
django_notifications_rest-1.0.2.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-notifications-rest 1.0.2
File Interpreter ABI Platform
django_notifications_rest-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 16.1 kB

Release files / django_notifications_rest-1.0.2.tar.gz

Download URL django_notifications_rest-1.0.2.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
391569c76f1c9ad1d3cc5896129c63d29b264a3235a2c85afc36359949cb87cc
BLAKE2b-256 checksum
How to use checksums
f5efd40210a4a9939ece847124fc67a2afb2590668f5edde70fa9fcc08053c68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / django_notifications_rest-1.0.2-py2.py3-none-any.whl

Download URL django_notifications_rest-1.0.2-py2.py3-none-any.whl
Size 8.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0faa394f4009c783644da69e89354b3e7aa217fcc634fce8d5e01b1d7885038b
BLAKE2b-256 checksum
How to use checksums
ee79a892294a7f0650543076b7ed7c549924033adaafd99a16dba1ef7528021e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page