Skip to main content
========
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.


Metadata

Release files for djpush 0.9.91

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

Source distribution (sdist)

Source distribution for djpush 0.9.91
File Size Uploaded
djpush-0.9.91.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djpush 0.9.91
File Interpreter ABI Platform
djpush-0.9.91-py3-none-any.whl Python 3 none any Details

Total release size: 26.9 kB

Release files / djpush-0.9.91.tar.gz

Download URL djpush-0.9.91.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4f3ff39a83d6280a7de6382b5d99941337d6412d670afd9de4cd92dcfd1990e5
BLAKE2b-256 checksum
How to use checksums
4ccec613e5f5bad1a7cdbd8d04c4f9937e07908d889ab81db0437b1b5a0a3894
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / djpush-0.9.91-py3-none-any.whl

Download URL djpush-0.9.91-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00e61f7d6d7d875c0bc018db6be55b53e735a95b74195ac24bdec130cd3b748b
BLAKE2b-256 checksum
How to use checksums
7cba13a998a59e39988c9a644760816d3814a70dceedfb002a2cdc955ef8f3a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9.91 This release

2 release files

0.9.90

2 release files

0.9.41

2 release files

0.9.7

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.1

2 release files

0.9

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