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.

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

Uploaded Source

Built Distribution

djpush-0.9.3-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for djpush-0.9.3.tar.gz
Algorithm Hash digest
SHA256 fcb23f214ab5f4c9cc7d6f52ffe61ca7c128876c9120f0647ce98936a504a630
MD5 91316602fb6974ddbd200d0513fb5b77
BLAKE2b-256 032f5c3bb223a34b8ee14fd154975fbefd87dedd06eae6812a81eeaf34d08031

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for djpush-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 20fc967965705ff80fdf308841c7f272a72d92cc50d9080a509c88421e68b0f7
MD5 66351bb579f7d59fbaf70a6e5dab0047
BLAKE2b-256 b5014514350399faad16d12ff7aaaab6d14ca191fcfceb0bc5eed3d04ebfdd54

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