Skip to main content

Manage programatic *Push Notifications* from Django admin

Project description

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.

  • (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 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).

# 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.1.linux-x86_64.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

djpush-0.9.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file djpush-0.9.1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for djpush-0.9.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 6f754d118ed4721e8fe88d87e99e314bd2d5869749bda3437483e0bba7ec7f08
MD5 34973f49539c9da44464bfda45a73451
BLAKE2b-256 27c2d153926f5a548c3aa6d868c0651d8ffc3d068a162388ea36f7a90c4b6536

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for djpush-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb6b1dadeae9056ac0684b33ce0d6cbee0f978b372d24061d6fdab37f2fe9034
MD5 9a8c2fbc6884b1038f6b82eac3bf0550
BLAKE2b-256 f83dbb46782b9ff9faa748606e5cda92fe8ec3ac145efcd9a4011f8a36a295d5

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