1. Quickstart

  1. Install package via pip:

    $ pip install django-gcm
    
  2. Add django-gcm resources to your URL router:

    # urls.py
    from django.conf.urls import include, url
    
    urlpatterns = [
        url(r'', include('gcm.urls')),
    ]
    

    To check gcm urls just use the following command:

    $ python manage.py gcm_urls
    
    GCM urls:
    * Register device
        /gcm/v1/device/register/
    * Unregister device
        /gcm/v1/device/unregister/
    
  3. Configure django-gcm in your settings.py file:

    INSTALLED_APPS = [
        # ...
        'gcm',
    ]
    
    GCM_APIKEY = "<api_key>"
    

Note

To obtain api key go to https://code.google.com/apis/console and grab the key for the server app.