Skip to main content

Support for Safari Push Notifications from within Django

Project description

https://badge.fury.io/py/django-safari-notifications.png https://travis-ci.org/matiboy/django-safari-notifications.png?branch=master

Support for Safari Push Notifications from within Django

Documentation

The full documentation is at https://django-safari-notifications.readthedocs.io.

For the Safari Push documentations, refer to Apple Safari Push.

Quickstart

Install django_safari_notifications:

pip install django-safari-notifications

If you already have a valid “pushPackage.zip”, please serve it directly via your web server (Nginx/Apache) at the corresponding url: “{webServiceUrl}/{version}/pushPackages/{websitePushID}” (refer to Apple Safari Push)

Else, you must subclass django_safari_notifications.apps.DjangoSafariNotificationsConfig and set the cert and passphrase values.

from django_safari_notifications.apps import DjangoSafariNotificationsConfig

class MySafariNotificationsConfig(DjangoSafariNotificationsConfig):
    cert = '/path/to/cert.pem'
    passphrase = 'passphrase for key'

then add your config to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'my_safari_app.apps.MySafariNotificationsConfig', # if you need the pushPackage to be dynamically built
    ## OR ##
    'django_safari_notifications.apps.DjangoSafariNotificationsConfig', # If you are serving your own push package via Nginx
    ...
)

Add django_safari_notifications’s URL patterns:

from django_safari_notifications import urls as django_safari_notifications_urls


urlpatterns = [
    ...
    url(r'^', include(django_safari_notifications_urls, namespace='safari_pn')),
    ...
]

Do not use any prefix for the unless you are serving your own pushPackage.zip statically

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2016-12-10)

  • First release on PyPI.

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

django-safari-notifications-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_safari_notifications-0.1.0-py2.py3-none-any.whl (11.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-safari-notifications-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-safari-notifications-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3f6bf52d979104a11ddca0d33393c9154235fadbf1d7ef67deb6d2bd9f21e89
MD5 b5782ad48a5118ba10f91800b3406830
BLAKE2b-256 ac0dadd4fda9206382f1f0c073dd5282282a85990c6f0c4cf3090abfaacb833e

See more details on using hashes here.

File details

Details for the file django_safari_notifications-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_safari_notifications-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e48f994abe563aaad97c7bb234bde0ec88b20944b1a3eb1585dfd65170d55305
MD5 675ad0015203f5a78d787ff3253682ac
BLAKE2b-256 5de8df4b7f04b9a3848cc926cb51b383161bb7c545d4c3953e865f2809e23085

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page