Giter Club home page Giter Club logo

django_safari_notifications's Introduction

Django Safari Push Notifications

Latest PyPI version https://travis-ci.org/matiboy/django_safari_notifications.png?branch=master

Support for Safari Push Notifications from within Django. Note that this package helps registering notifications, not sending them. Safari Push works with APNs, so for sending, please use APNs Clerk.

Documentation

The full documentation will soon be 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 urls, 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:

django_safari_notifications's People

Contributors

matiboy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

reduxionist

django_safari_notifications's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.