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

Uploaded Source

Built Distribution

djpush-0.9-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for djpush-0.9.tar.gz
Algorithm Hash digest
SHA256 ee9ccb41311dcf6b0a42560c863e64e0bf15488c5fce4f54f6cad21694f44e28
MD5 86a27a4cd366b910870435aec1656e71
BLAKE2b-256 1ee665043bd64115465de699d98b2ff6943f01fec18d56c13a06d126655dd3e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for djpush-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b9b6a919d78fc48fdf5d285343f0ecc851183a98a067615329560a610ddec3b5
MD5 56728f518e3743ea20a2d6fe395d680c
BLAKE2b-256 9a706512c575a23871f7e8a40edf917db7b009e71af3fcf9b5d544e66d631aeb

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