{ "info": { "author": "Vikas Yadav", "author_email": "v1k45x@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4" ], "description": "============================\ndjango-notify-x: quick guide\n============================\n\n.. image:: https://readthedocs.org/projects/django-notify-x/badge/?version=latest\n :target: http://django-notify-x.readthedocs.org/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://badge.fury.io/py/django-notify-x.svg\n :target: https://badge.fury.io/py/django-notify-x\n\n.. image:: https://travis-ci.org/v1k45/django-notify-x.svg\n :target: https://travis-ci.org/v1k45/django-notify-x\n\n\nDjango NotifyX is a reusable app which adds notification system features to your Django app.\n\nIt was inspired from `django-notifications`_ , major differences include:\n - Multipe user notification at once.\n - A different approach for notification updates.\n - Less hassles when trying to format notifications differently according to their types.\n - AJAX support for everything.\n - And many more.\n\nThis is just a quick guide to get things to work ASAP. To dive into the details.. `Read the docs`_\n\nHow to install\n==============\n\nDownloading the package\n-----------------------\n\nProbably the best way to install is by using `PIP`::\n\n $ pip install django-notify-x\n\nIf you want to stay on the bleeding edge of the app::\n\n $ git clone https://github.com/v1k45/django-notify-x.git\n $ cd django-notify-x\n $ python setup.py install\n\nInstalling it on your project\n-----------------------------\n\nAfter the you've installed ``django-notify-x`` in your python enviroment. You have to make an entry of the same in your project ``settings.py`` file::\n\n INSTALLED_APPS = (\n ...\n 'your.other.apps',\n ...\n 'notify',\n )\n\nThen an entry on the ``urls.py`` file::\n\n\n urlpatterns = (\n url(r'^notifications/', include('notify.urls', 'notifications')),\n )\n\nThen run migrations::\n\n $ python manage.py migrate notify\n\nThen ``collectstatic`` to make sure you've copied the JS file for AJAX functionality::\n\n $ python manage.py collectstatic\n\nYou've successfully installed ``django-notify-x``!\n\nSending notifications\n=====================\n\nSending notifications to a single user:\n---------------------------------------\n\n.. code-block:: python\n\n from notify.signals import notify\n\n # your example view\n def follow_user(request, user):\n user = User.objects.get(username=user)\n ...\n dofollow\n ...\n\n notify.send(request.user, recipient=user, actor=request.user\n verb='followed you.', nf_type='followed_by_one_user')\n\n return YourResponse\n\n\nEasy as pie, isn't it?\n\nSending notifications to multiple users:\n----------------------------------------\n\n.. code-block:: python\n\n from notify.signals import notify\n\n # your example view\n def upload_video(request):\n ...\n uploadvideo...\n ...\n video = VideoUploader.getupload()\n followers = list(request.user.followers())\n\n notify.send(request.user, recipient_list=followers, actor=request.user\n verb='uploaded.', target=video, nf_type='video_upload_from_following')\n\n return YourResponse\n\nJust change the ``recipient`` to ``recipient_list`` and send notifications to as many users you want!\n\n.. warning::\n ``recipient_list`` expects supplied object to be a list() instance, make sure you convert your ``QuerySet`` to list() before assigning vaule.\n\nNotification concatenation support\n----------------------------------\n\nNotification Concatenation is what you see when you read notifications like **Bob and 64 others liked your status**. A developmental support is available for it, but it only supports Python3 for now.\n\nIf you use Python3, you can add this feature to your application.\nPlease read instructions on `nf_concat_support `__ branch.\n\nNotification Template tags\n==========================\n\nThis app comes with two notification tags, one renders notifications for you and the other includes javascript variables and functions relating the ``notifyX.js`` file.\n\nrender_notifications\n--------------------\n\n As its name reflects, it will render notifications for you. ``render_notifications`` will take at least one parameter and maximum two parameters.\n\n You can use them to render notifications using a ``Notification`` QuerySet object, like this::\n\n {% load notification_tags %}\n {% render_notifications using request.user.notifications.active %}\n\n By default, the above tag will render notifications on the notifications page and not on the notification box. So it will use a template corresponing to it's ``nf_type`` with a ``.htm`` suffix nothing more.\n\n To render notificatons on a notifications box::\n \n {% load notification_tags %}\n {% render_notifications using request.user.notifications.active for box %}\n\n This tag will look for template name with ``_box.html`` suffixed when rendering notification contents.\n\n The ``request.user.notifications.active`` is just used to show an example of notification queryset, you can use any other way to supply a QuerySet of your choice.\n\ninclude_notify_js_variables\n---------------------------\n\n This tag uses ``notifications/includes/js_variables.html`` to include a template populated with JS variables and functions. You can override the values of any JS variables by creating your own version of ``js_variables.html`` template.\n\n To include JS variables for AJAX notification support, do this::\n\n {% load notification_tags %}\n {% include_notify_js_variables %}\n\n This template inclusion includes three javascript files from the template includes directory, they are::\n\n mark_success.js\n mark_all_success.js\n delete_success.js\n update_success.js\n\n All of them are nothing but javascript function declarations which are supposed to run when a JQuery AJAX request is successfully completed.\n\nuser_notifications\n------------------\n\n The ``user_notifications`` tag is a shortcut to the ``render_notifications`` tag. It directly renders the notifications of the logged-in user on the specified target.\n\n You can use this tag like this::\n\n {% load notification_tags %}\n {% user_notifications %}\n\n This tag renders active notifications of the user by using something like ``request.user.notifications.active()``.\n\n Just like ``render_notifications`` it also takes rendering target as an optional argument. You can specify rendering target like this::\n\n {% load notification_tags %}\n {% user_notifications for box %}\n\n By default, it'll use 'page' as the rendering target and use full page notification rending template corresponding to the ``nf_type`` of the template.\n\nAnd other things...\n===================\n\nIt will be best to `Read the Docs`_ instead of expecting every thing from a quick guide :)\n\nTODO List\n=========\n\n- Add notification concatenation support.\n - Notification concatenation is what facebook does when you read a notification like *Bob and 18 others commented on your blogpost*.\n - This will require non-anonymous activity stream field.\n - I've to either remove the anonymous notification support or find another way to implement this feature.\n - **work in progress!**\n- Convert *Function based views* to *Class Based views*.\n\n.. _django-notifications: https://www.github.com/django-notifications/django-notifications/\n.. _Read the docs: http://django-notify-x.readthedocs.org/en/latest/index.html", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/v1k45/django-notify-x", "keywords": "django notifications,notify,facebook like notifications", "license": "The MIT License", "maintainer": "", "maintainer_email": "", "name": "django-notify-x", "package_url": "https://pypi.org/project/django-notify-x/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-notify-x/", "project_urls": { "Homepage": "https://github.com/v1k45/django-notify-x" }, "release_url": "https://pypi.org/project/django-notify-x/0.1.9/", "requires_dist": null, "requires_python": "", "summary": "Notification sytem for Django", "version": "0.1.9" }, "last_serial": 3498592, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "aa83eec684eecc6d2b5875506e8fe0e0", "sha256": "207a06e3cdb7c6a5e05b3dd821b94faf8ff7103720b889c72359465066ecb58f" }, "downloads": -1, "filename": "django-notify-x-0.1.tar.gz", "has_sig": false, "md5_digest": "aa83eec684eecc6d2b5875506e8fe0e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19188, "upload_time": "2015-12-11T13:10:58", "url": "https://files.pythonhosted.org/packages/26/ca/efaae2071874fc6e4550c7ad0cf97f0f27ea768e1b742e95db8c0b2690c0/django-notify-x-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5ca2bb33ee8ff34f7cda532c95e5738e", "sha256": "9b3f1cbaff12736a268abf6b955156e5c429c4a1c98126e64789a7c3f17461b5" }, "downloads": -1, "filename": "django-notify-x-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5ca2bb33ee8ff34f7cda532c95e5738e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20685, "upload_time": "2015-12-18T10:35:25", "url": "https://files.pythonhosted.org/packages/d0/d1/e2802a0afd2d80667ed56e332f6ce0c76870a68d20c78045a6139babf595/django-notify-x-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "257b5cc6085cc04bc48ee2237573866c", "sha256": "e586ca6ec1c40f4c4d8da8639bed7239ba038fca54c8505ddccca7b915595985" }, "downloads": -1, "filename": "django-notify-x-0.1.2.tar.gz", "has_sig": false, "md5_digest": "257b5cc6085cc04bc48ee2237573866c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24968, "upload_time": "2015-12-21T12:57:29", "url": "https://files.pythonhosted.org/packages/c8/b2/082ec80178519de3a3c61a34b2eb905700bbe3d11082ee5c60e960def701/django-notify-x-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c2b4bceebbf80eb504d7496a59320141", "sha256": "bec68aa9b52252ba8b0fff21db9a118472b3170a7b72e2e47dea72528a74de7e" }, "downloads": -1, "filename": "django-notify-x-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c2b4bceebbf80eb504d7496a59320141", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30919, "upload_time": "2015-12-30T16:32:43", "url": "https://files.pythonhosted.org/packages/fc/b5/a28898132a6d0f68cec50f6b7921fac773d6db9fd5931624a166aeffdb0c/django-notify-x-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7da24f12d17ac6676cbcc2a263913c7d", "sha256": "2d5e382b24d75248c022208cceb8138fcae52d4b37e15eebbbd6cd5097737bcc" }, "downloads": -1, "filename": "django-notify-x-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7da24f12d17ac6676cbcc2a263913c7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32519, "upload_time": "2016-02-13T09:59:55", "url": "https://files.pythonhosted.org/packages/d8/8e/f9b6f2f00b5eef9535e5cf555eb391407bff6f029887962fc026f3705d15/django-notify-x-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "03cf47d8a3f6913d98b19af0b4386ddc", "sha256": "d7e597a74bbf68948c1c0474f7e802f95c058ad575dffbcdced9035853d2f5d0" }, "downloads": -1, "filename": "django-notify-x-0.1.5.tar.gz", "has_sig": false, "md5_digest": "03cf47d8a3f6913d98b19af0b4386ddc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32866, "upload_time": "2016-03-27T06:06:37", "url": "https://files.pythonhosted.org/packages/11/9e/fa21c25f510421a335de77045cf7ea383af07705dfbef1029caf7f8b7b37/django-notify-x-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "b66e88ffffec9cccd17b3d8c2c35884a", "sha256": "52f1c0cf0ca17e1b111a4844b9551ff4f5bb00ec8c285000090bc7aaa4022a6d" }, "downloads": -1, "filename": "django-notify-x-0.1.6.tar.gz", "has_sig": false, "md5_digest": "b66e88ffffec9cccd17b3d8c2c35884a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33097, "upload_time": "2016-04-29T13:31:16", "url": "https://files.pythonhosted.org/packages/6f/f8/d2308399ed49d9ff9b5598be9dd09174e00fa11eeea761c8cf6b0ed943e3/django-notify-x-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "9f027ee5c7cf9d13655702b842f4ec57", "sha256": "dc11aba7fd621f8d038438adeb99abcc25da35351835eff8295fd98e3f083e01" }, "downloads": -1, "filename": "django-notify-x-0.1.7.tar.gz", "has_sig": false, "md5_digest": "9f027ee5c7cf9d13655702b842f4ec57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30306, "upload_time": "2017-04-14T18:56:13", "url": "https://files.pythonhosted.org/packages/75/c8/fd038c1decb74a6aacf777b7cb451acec42f6d8690c4f80e715757e79656/django-notify-x-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "9a11acef8e29d6353e67c2ea98e58c60", "sha256": "ff870f55fc64c5ba5bfa15f44df36582a23f0627b5b1547a82ab86f98a791918" }, "downloads": -1, "filename": "django-notify-x-0.1.8.tar.gz", "has_sig": false, "md5_digest": "9a11acef8e29d6353e67c2ea98e58c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33169, "upload_time": "2017-12-17T14:49:57", "url": "https://files.pythonhosted.org/packages/47/9f/5ccf9d0d7bfb04bf2c18b9fd75c5c33f0a17900f10746c45ce909b4bc260/django-notify-x-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "8fa6e48299460b1a1ca8ad53c702e9ea", "sha256": "83bae3042cae4f19967567970006a9385600872670d9db5a84625997a24ae06f" }, "downloads": -1, "filename": "django-notify-x-0.1.9.tar.gz", "has_sig": false, "md5_digest": "8fa6e48299460b1a1ca8ad53c702e9ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33364, "upload_time": "2018-01-17T20:58:17", "url": "https://files.pythonhosted.org/packages/da/58/5c4d91ac348e3333a35d8ccd2dfc5696b68b7a8e5dcf4cb2fb16c4a84d7a/django-notify-x-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8fa6e48299460b1a1ca8ad53c702e9ea", "sha256": "83bae3042cae4f19967567970006a9385600872670d9db5a84625997a24ae06f" }, "downloads": -1, "filename": "django-notify-x-0.1.9.tar.gz", "has_sig": false, "md5_digest": "8fa6e48299460b1a1ca8ad53c702e9ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33364, "upload_time": "2018-01-17T20:58:17", "url": "https://files.pythonhosted.org/packages/da/58/5c4d91ac348e3333a35d8ccd2dfc5696b68b7a8e5dcf4cb2fb16c4a84d7a/django-notify-x-0.1.9.tar.gz" } ] }