{ "info": { "author": "hipo", "author_email": "pypi@hipolabs.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "![Sloop](/docs/img/splash.jpg?raw=true \"Django-Sloop\")\n\n\nDjango Sloop is the fastest & most reliable RESTful push notification service so far. This package contains some tools that will ease the implementation of sloop into django projects.\n\n# Django-Sloop\n\n## Installation\n\n1. Install the package via Github or PIP (pip install django-sloop)\n\n2. Add **django_sloop** to the INSTALLED_APPS list in the settings file.\n\n3. Extend the django_sloop.models.AbstractSNSDevice class and create your own push token device model.\n\n```python\n# models.py\n\nfrom django_sloop.models import AbstractSNSDevice\n\n\nclass Device(AbstractSNSDevice):\n pass\n \n # (Optional) if you need to override Meta.\n class Meta(AbstractSNSDevice.Meta):\n pass\n```\n\n4. Make sure that you fill necessary information at the settings file:\n\n```python\n# settings.py\n\nDJANGO_SLOOP_SETTINGS = {\n \"AWS_REGION_NAME\": \"\",\n \"AWS_ACCESS_KEY_ID\": \"\",\n \"AWS_SECRET_ACCESS_KEY\": \"\",\n \"SNS_IOS_APPLICATION_ARN\": \"test_ios_arn\",\n \"SNS_IOS_SANDBOX_ENABLED\": False,\n \"SNS_ANDROID_APPLICATION_ARN\": \"test_android_arn\",\n \"LOG_SENT_MESSAGES\": False, # False by default.\n \"DEFAULT_SOUND\": \"\",\n \"DEVICE_MODEL\": \"module_name.Device\",\n}\n```\n\nYou cannot change the DEVICE_MODEL setting during the lifetime of a project (i.e. once you have made and migrated models that depend on it) without serious effort. The model it refers to must be available in the first migration of\nthe app that it lives in.\n\n5. Create migrations for newly created Device model and migrate.\n\n**Note:** django_sloop's migrations must run after your Device is created. If you run into a problem while running migrations add following to the your migration file where the Device is created.\n```\nrun_before = [\n ('django_sloop', '0001_initial'),\n]\n```\n\n6. Add django_sloop.models.PushNotificationMixin to your User model.\n```python\nclass User(PushNotificationMixin, ...):\n pass\n\nuser.send_push_notification_async(message=\"Sample push notification.\")\n\n```\n\n\n7. Add django_sloop.admin.SloopAdminMixin to your UserAdmin to enable sending push messages to users from Django admin panel.\n\n```python\n# admin.py\n\nfrom django_sloop.admin import SloopAdminMixin\nfrom django.contrib import admin\n\nclass UserAdmin(SloopAdminMixin, admin.ModelAdmin):\n \n actions = (\"send_push_notification\", )\n \n```\n\n8. Add django rest framework urls to create and delete device.\n\n```python\n# urls.py\nfrom django.conf.urls import url\nfrom django.urls import include\n\nurlpatterns = [\n # ...\n url(r'^api/devices/', include('django_sloop.urls')),\n # ...\n]\n```\n\nDone!", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Hipo/django-sloop", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "django-sloop", "package_url": "https://pypi.org/project/django-sloop/", "platform": "", "project_url": "https://pypi.org/project/django-sloop/", "project_urls": { "Homepage": "https://github.com/Hipo/django-sloop" }, "release_url": "https://pypi.org/project/django-sloop/1.0.4/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "summary": "Django application to send push notifications to IOS and Android devices using Amazon SNS.", "version": "1.0.4" }, "last_serial": 5815045, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "511036bc2a0dd74a0ae115f3723b5cdd", "sha256": "df52e66a4a0c7dd9fa2c4da6a93ecc3d2861c233f5f5f109b1c068588d1cc27b" }, "downloads": -1, "filename": "django-sloop-1.0.2.tar.gz", "has_sig": false, "md5_digest": "511036bc2a0dd74a0ae115f3723b5cdd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 59064, "upload_time": "2019-08-14T15:50:29", "url": "https://files.pythonhosted.org/packages/d8/4f/d91284bb437ccbed022c392bf7d0aba424bb08c54b5c01009160766cd714/django-sloop-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "7a9eacfc35a7cd5fd758809c27b366ba", "sha256": "d3cd62dbf9fe80f341c423f364cce09ea9e99712e849f532f59741823558a6ca" }, "downloads": -1, "filename": "django-sloop-1.0.3.tar.gz", "has_sig": false, "md5_digest": "7a9eacfc35a7cd5fd758809c27b366ba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 59276, "upload_time": "2019-08-14T16:56:39", "url": "https://files.pythonhosted.org/packages/25/53/190e34075d701d58a5b530b96b341d50863b06d9a080e4654e7a9696c03e/django-sloop-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "9d62531af25f79d4db2ff78ab8b1ff28", "sha256": "6d8d936c27ede9505d6539a887eb1dfb51d58cae6bf53e03b3d7fa73fec2b14b" }, "downloads": -1, "filename": "django-sloop-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9d62531af25f79d4db2ff78ab8b1ff28", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 59354, "upload_time": "2019-09-11T13:47:15", "url": "https://files.pythonhosted.org/packages/8f/e8/e3a9ad42c69b371ee3544f4fc254c6e69c655b4c1d3fa8f2e3e4f41d89c5/django-sloop-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9d62531af25f79d4db2ff78ab8b1ff28", "sha256": "6d8d936c27ede9505d6539a887eb1dfb51d58cae6bf53e03b3d7fa73fec2b14b" }, "downloads": -1, "filename": "django-sloop-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9d62531af25f79d4db2ff78ab8b1ff28", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 59354, "upload_time": "2019-09-11T13:47:15", "url": "https://files.pythonhosted.org/packages/8f/e8/e3a9ad42c69b371ee3544f4fc254c6e69c655b4c1d3fa8f2e3e4f41d89c5/django-sloop-1.0.4.tar.gz" } ] }