{ "info": { "author": "Andy Baker", "author_email": "andy@andybak.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-admin-notifications\n==========================\n\nA simple app to allow apps to register notifications that can be displayed in the admin via a template tag\n\n\nInstallation\n------------\n\nAdd 'admin_notifications' to INSTALLED_APPS\n\n\nBasic usage\n-----------\n\n\nCustomize whichever of your admin templates you which to display the notifications thus.\n\nload the template tags at the start of the template::\n\n {% load notification_tag %}\n\nadd the tag to your template. I customised the admin index template and placed the tag before the 'content-main' DIV like thus::\n\n {% block content %}\n \n {% error_notifications %}\n
\n\nin urls.py::\n\n import admin_notifications\n admin_notifications.autodiscover()\n\nThis looks in each app for a file called 'notifications.py and registers it if it exists.\n\n\nNotifications files can contain as many functions as you like. Each one should return a string which can contain HTML and each one needs to be registered using admin_notifications.register\n\nIf you return an empty string then no notification is shown.\n\nNotifications functions are called every time the admin template is rendered so avoid doing heavy calculations in the notification.\n\nAn example notifications.py might look like this::\n\n import admin_notifications\n from models import Url\n def notification():\n broken_links = Url.objects.filter(status=False).count()\n if broken_links:\n return \"You have %s broken link%s.
You can view or fix them using the Link Manager.\" % (broken_links, \"s\" if broken_links>1 else \"\")\n else:\n return ''\n\n admin_notifications.register(notification)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/andybak/django-admin-notifications/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-admin-notifications", "package_url": "https://pypi.org/project/django-admin-notifications/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-admin-notifications/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/andybak/django-admin-notifications/" }, "release_url": "https://pypi.org/project/django-admin-notifications/0.6.3/", "requires_dist": null, "requires_python": null, "summary": "A simple app to allow apps to register notifications that can be displayed in the admin via a template tag.", "version": "0.6.3" }, "last_serial": 789051, "releases": { "0.6.3": [ { "comment_text": "", "digests": { "md5": "e65f36629b1e656ec3b195093948797a", "sha256": "c8d255c221cc17a95071aabe99e582057858451b014ec807dba2b50419b051d2" }, "downloads": -1, "filename": "django-admin-notifications-0.6.3.tar.gz", "has_sig": false, "md5_digest": "e65f36629b1e656ec3b195093948797a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3266, "upload_time": "2011-02-06T20:58:35", "url": "https://files.pythonhosted.org/packages/59/08/eb5b51a61ffb52da13c4ea6e3d52ef1d4ca80048bc7ce82f67fb7ab26787/django-admin-notifications-0.6.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e65f36629b1e656ec3b195093948797a", "sha256": "c8d255c221cc17a95071aabe99e582057858451b014ec807dba2b50419b051d2" }, "downloads": -1, "filename": "django-admin-notifications-0.6.3.tar.gz", "has_sig": false, "md5_digest": "e65f36629b1e656ec3b195093948797a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3266, "upload_time": "2011-02-06T20:58:35", "url": "https://files.pythonhosted.org/packages/59/08/eb5b51a61ffb52da13c4ea6e3d52ef1d4ca80048bc7ce82f67fb7ab26787/django-admin-notifications-0.6.3.tar.gz" } ] }