jleclanche/django-push-notifications — pull request #105 by peterhinson (2014-11-06 00:45:58+00:00)
Title: Django REST Framework support

Optional serializers, view sets, and URL routes for use with Django REST Framework. The included views allow authenticated users to view/add/remove devices associated with their account. These views can be used as is or inherited from if you'd like to modify permissions or functionality.

Pretty simple to use. Here's an example of how to include the URL routes:

```python
from push_notifications.django_rest_api import gcm_list, apns_list, gcm_detail, apns_detail

# ... in your URL patterns

# GCM API notifications
url(r'^api/devices/gcm/$',
gcm_list,
name='api_devices_gcm_list'),

url(r'^api/devices/gcm/(?P[\w-]+)/$',
gcm_detail,
name='api_devices_gcm_detail'),

# APNS notifications
url(r'^api/devices/apns/$',
apns_list,
name='api_devices_apns_list'),

url(r'^api/devices/apns/(?P[\w-]+)/$',
apns_detail,
name='api_devices_apns_detail'),
```