Django-notifications-views
Django-notifications-views is an extension for Django-notifications-hq that provides a viewset for the notifications and expo notifications.
Requirements
- Django >= 3.8 *
- Python >= 3.8 *
- django-notifications-hq >= 1.8 *
(*) Not tested with earlier versions.
Quick Setup
Install package
pip install django-notifications-views
Add django_notifications_views app to INSTALLED_APPS in your django settings.py:
INSTALLED_APPS = (
...,
"django.contrib.staticfiles",
"rest_framework", # required only if using the provided REST endpoints
'notifications',
'django_notifications_views',
...,
)
Include viewset routes
from django_notifications_views.urls import router as django_notifications_views_router
your_router.registry.extend(django_notifications_views_router.registry)
Add the following to your settings.py if you want to enable Expo Go notifications:
DJANGO_NOTIFICATIONS_VIEWS = {
'USE_EXPO_NOTIFICATIONS': True, # Set to True to enable expo notifications
'EXPO_APP_ID': '<your-expo-app-id>',
}
Then run the migrations:
python manage.py makemigrations
python manage.py migrate
## Urls
GET /api/user-notifications/ : Get all notifications for the current user
POST /api/user-notifications/read-all/ : Mark all notifications as read for the current user
GET /api/user-notifications/<int:pk>/ : Get a notification by id and mark it as read
# Expo Notifications
POST /api/expo-devices/register-device/ : Register a device to receive expo notifications
POST /api/expo-devices/unregister-device/ : Unregister a device to stop receiving expo notifications
## Contributing
- [Juan Ignacio Borrelli](https://www.linkedin.com/in/juan-ignacio-borrelli/)
Maintained and developed by [Linkchar Software Development](https://linkchar.com/).
Metadata
Release files for django-notifications-views 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_notifications_views-0.3.1.tar.gz | 6.9 kB | Without provenance | Details for django_notifications_views-0.3.1.tar.gz |
Release files / django_notifications_views-0.3.1.tar.gz
| Download URL | django_notifications_views-0.3.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2c895ee7f0e4aa2968fa4ed4a482fb599f4fb7fc79be1db8de83461111d7745
|
|
BLAKE2b-256 checksum How to use checksums |
3933c37609808679f8f2589a765aeaeddfed29d87ea64d635aa94e718ea55c18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Security for django-notifications-views 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.