Manage programatic *Push Notifications* from Django admin
Project description
========
Djpush
========
Manage programatic *Push Notifications* from Django admin.
Features
========
- Define notifications via the admin
- Categorize notifications
- Schedule notifications by category
- Choose your provider(APNS/apns2, GCM/gcm, OneSignal/yaosac). Actually you must install one.
- Same notification in time range are canceled
- (optional) Multiple language support via django-modelstranslation
Important Dependencies
======================
- django-timezone-field
- pytz
Usage
=====
In your `settings.py` define:
DJPUSH_NOTIFICATIONS_CHOICES
A list of `slugs <https://docs.djangoproject.com/en/1.11/glossary/#term-slug>`_ representing the notifications you want to send.
DJPUSH_DEFAULT_PROVIDER
The provider you want to use to send notifications(values can be found in `pypn <https://github.com/alej0varas/pypn>`_).
optional settings
DJPUSH_NOTIFICATION_EXPIRES
The number of seconds after task will be considered expired
.. code-block:: python
# Get a notification, you define them in the admin
notification = models.Notification.objects.get(slug='a-slug', enabled=True)
# Create a notification instance
notification_instance = models.NotificationInstance.objects.create(notification=notification, tokens=tokens, data=data)
# Send the notification
notification_instance.send()
Development
===========
Update migrations
-----------------
::
DJANGO_SETTINGS_MODULE=migration_settings django-admin makemigrations
Run tests
---------
::
./runtests.py
Build/Publish
-------------
::
rm -rf dist
python setup.py sdist bdist_wheel
twine upload dist/*
Translations
------------
To enable translations you have to install `django-modeltranslation`
and add `MIGRATION_MODULES = {'djpush': 'djangoproject.migrations'}`
to your settings.
Notifications will be sent including the available tranlations.
Djpush
========
Manage programatic *Push Notifications* from Django admin.
Features
========
- Define notifications via the admin
- Categorize notifications
- Schedule notifications by category
- Choose your provider(APNS/apns2, GCM/gcm, OneSignal/yaosac). Actually you must install one.
- Same notification in time range are canceled
- (optional) Multiple language support via django-modelstranslation
Important Dependencies
======================
- django-timezone-field
- pytz
Usage
=====
In your `settings.py` define:
DJPUSH_NOTIFICATIONS_CHOICES
A list of `slugs <https://docs.djangoproject.com/en/1.11/glossary/#term-slug>`_ representing the notifications you want to send.
DJPUSH_DEFAULT_PROVIDER
The provider you want to use to send notifications(values can be found in `pypn <https://github.com/alej0varas/pypn>`_).
optional settings
DJPUSH_NOTIFICATION_EXPIRES
The number of seconds after task will be considered expired
.. code-block:: python
# Get a notification, you define them in the admin
notification = models.Notification.objects.get(slug='a-slug', enabled=True)
# Create a notification instance
notification_instance = models.NotificationInstance.objects.create(notification=notification, tokens=tokens, data=data)
# Send the notification
notification_instance.send()
Development
===========
Update migrations
-----------------
::
DJANGO_SETTINGS_MODULE=migration_settings django-admin makemigrations
Run tests
---------
::
./runtests.py
Build/Publish
-------------
::
rm -rf dist
python setup.py sdist bdist_wheel
twine upload dist/*
Translations
------------
To enable translations you have to install `django-modeltranslation`
and add `MIGRATION_MODULES = {'djpush': 'djangoproject.migrations'}`
to your settings.
Notifications will be sent including the available tranlations.
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
djpush-0.9.90.tar.gz
(11.9 kB
view details)
Built Distribution
djpush-0.9.90-py3-none-any.whl
(15.3 kB
view details)
File details
Details for the file djpush-0.9.90.tar.gz
.
File metadata
- Download URL: djpush-0.9.90.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f298174a344986d0efe4d5211bcb536a6c662261174dd4d1ef3186432f559973 |
|
MD5 | 9f4fb1f00d1001884c45ed1be8062571 |
|
BLAKE2b-256 | b467c3eca55e00fc2f9b5ed9c1721c723b73c5162b0aa005dc1dace8cb4723f3 |
File details
Details for the file djpush-0.9.90-py3-none-any.whl
.
File metadata
- Download URL: djpush-0.9.90-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0fba7cf4fefd961f4bc64b2dcfd226703781b6dd311e3907997134569e70e7 |
|
MD5 | 7b6d6558d7187b1d6b5f0c5fb4e9347e |
|
BLAKE2b-256 | ae9a8e79a7838fcd5ed5fb2cb978b158ac365b328e95910cd505d84d807602ae |