Metadata-Version: 2.0
Name: djpush
Version: 0.9.1
Summary: Manage programatic *Push Notifications* from Django admin
Home-page: https://github.com/alej0varas/djpush
Author: Alexandre Varas
Author-email: alej0varas@gmail.com
License: GPL v3
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Requires-Dist: pypn
Requires-Dist: requests
Requires-Dist: celery
Requires-Dist: psycopg2
Requires-Dist: django-timezone-field

========
 Djpush
========

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 <https://docs.djangoproject.com/en/1.11/glossary/#term-slug>`_ 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 <https://github.com/alej0varas/pypn>`_).

.. code-block:: python

   # 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.


