Django Push is a Push notification server enabled for both APNS and GCM.
a) Install Python if you havent yet.
sudo apt-get install python-setuptools python-dev build-essential
b) Install or upgrade Django
pip install django
or
pip install django --upgrade
c) Clone DjangoPush
git clone https://github.com/vignesh-vs-in/django-push.git
-
Install Celery and RabbitMQ. Django push uses celery for running async jobs.
-
Start RabbitMQ
sudo rabbitmq-server -detached
-
Start Celery worker
python manage.py celery worker -n worker1
DjangoPush supports multiple workers running simultaneously. A single worker can push both GCM and APNS message.
-
Follow steps from apple developer document to generate certificates.
-
Once you have installed the Certificate on your mac,
a) launch Keychain Assistant on your local Mac and filter by "My Certificates" category on the left pane. You will see your certificate “Apple Development IOS Push Services”.
b) Expand this option then right click on “Apple Development IOS Push Services” > Export “Apple Development Push Services x.x.x″. Save this as APNSClientPushCert.p12 file somewhere you can access it.
c) Now right click on the "key",which is below the certificate and select "Export key". DONT password protect the keys when exporting. Save this as APNSClientPushKey.p12 file somewhere you can access it.
3)Run
openssl pkcs12 -clcerts -nokeys -in APNSClientPushCert.p12 -out APNSClientPushCert.pem
openssl pkcs12 -nocerts -in APNSClientPushKey.p12 -out APNSClientPushKey.pem
- Copy the generated .pem files to DjangoPush/DjangoPush/
Set your AUTHORIZATION_KEY in settings.py.
DjangoPush is licensed under the The GNU General Public License