Skip to main content

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
======================

- celery
- 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
-------------

::

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


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.41.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

djpush-0.9.41-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file djpush-0.9.41.tar.gz.

File metadata

  • Download URL: djpush-0.9.41.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for djpush-0.9.41.tar.gz
Algorithm Hash digest
SHA256 c02766684e236254b9bfbb63b7b6670f7cdc445c9e1dc2caf4b7b3a426664295
MD5 e282beee46641f9ea2bb9fbfe0e3bbc6
BLAKE2b-256 cff058623d4c3d72c9806d0bf8d0300e0df394f37c097f626d348f9b58143c14

See more details on using hashes here.

File details

Details for the file djpush-0.9.41-py3-none-any.whl.

File metadata

File hashes

Hashes for djpush-0.9.41-py3-none-any.whl
Algorithm Hash digest
SHA256 a6173ca35aa4f36d5062c912cc4eb9315e04a45e4ca9c7300dd3213b86bfe31e
MD5 bd9973897b45dc8a7c3ae7ac5529561a
BLAKE2b-256 c865e201044ba5d832b42a65239c3a1cb2ecca68ad37ed916a5e84b3eb2cbc3f

See more details on using hashes here.

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