{ "info": { "author": "Michael Fladischer", "author_email": "michael@fladi.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.8", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "=====================\nDjango Accept Headers\n=====================\n\n.. list-table::\n :stub-columns: 1\n\n * - docs\n - |docs|\n * - tests\n - | |travis| |requires|\n | |codecov|\n |\n * - package\n - |version| |downloads| |wheel| |supported-versions| |supported-implementations|\n\n.. |docs| image:: https://readthedocs.org/projects/django-accept-header/badge/?style=flat\n :target: https://readthedocs.org/projects/django-accept-header\n :alt: Documentation Status\n\n.. |travis| image:: https://travis-ci.org/fladi/django-accept-header.svg?branch=master\n :alt: Travis-CI Build Status\n :target: https://travis-ci.org/fladi/django-accept-header\n\n.. |requires| image:: https://requires.io/github/fladi/django-accept-header/requirements.svg?branch=master\n :alt: Requirements Status\n :target: https://requires.io/github/fladi/django-accept-header/requirements/?branch=master\n\n.. |codecov| image:: https://codecov.io/github/fladi/django-accept-header/coverage.svg?branch=master\n :alt: Coverage Status\n :target: https://codecov.io/github/fladi/django-accept-header\n\n.. |version| image:: https://img.shields.io/pypi/v/django-accept-header.svg?style=flat\n :alt: PyPI Package latest release\n :target: https://pypi.python.org/pypi/django-accept-header\n\n.. |downloads| image:: https://img.shields.io/pypi/dm/django-accept-header.svg?style=flat\n :alt: PyPI Package monthly downloads\n :target: https://pypi.python.org/pypi/django-accept-header\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/django-accept-header.svg?style=flat\n :alt: PyPI Wheel\n :target: https://pypi.python.org/pypi/django-accept-header\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/django-accept-header.svg?style=flat\n :alt: Supported versions\n :target: https://pypi.python.org/pypi/django-accept-header\n\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/django-accept-header.svg?style=flat\n :alt: Supported implementations\n :target: https://pypi.python.org/pypi/django-accept-header\n\n\nA Django middleware that inspects the HTTP Acept headers sent by browsers. It adds a new method to each `request` instance called `accepts(str)` which can be used\nto determine if a certain mimetype is accepted by the user agent that issued the request.\n\nInstallation\n============\n\n::\n\n pip install django-accept-header\n\nUsage\n=====\n\nFirst add the middleware to your `settings.py` file::\n\n MIDDLEWARE_CLASSES = (\n # ...\n 'django_accept_header.middleware.AcceptMiddleware',\n )\n\nTo check if the `text/plain` mimetype is accepted by the user agent::\n\n def some_view(request):\n if request.accepts('text/plain'):\n # do something\n\nThe ordered list of accepted mimetypes can also be used::\n\n def some_view(request):\n for media_type in request.accepted_types:\n # do something\n\nSee the full documentation for how to use the media types please see the full documentation.\n\nDocumentation\n=============\n\nhttps://django-accept-header.readthedocs.org/\n\nDevelopment\n===========\n\nTo run the all tests run::\n\n tox\n\n0.3.0 / 2016-02-02\n==================\n\n * Change package name to django-accept-header.\n * Make python3.5 the default version used for tests.\n\n0.1.0 / 2015-11-26\n==================\n\n * First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fladi/django-accept-header", "keywords": "middleware,header,accept,mimetype", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-accept-header", "package_url": "https://pypi.org/project/django-accept-header/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-accept-header/", "project_urls": { "Homepage": "https://github.com/fladi/django-accept-header" }, "release_url": "https://pypi.org/project/django-accept-header/0.3.2/", "requires_dist": [ "Django", "docutils (>=0.11); extra == 'rst'", "pytest; extra == 'testing'" ], "requires_python": null, "summary": "A Django middleware that inspects the HTTP Accept headers sent by browsers.", "version": "0.3.2" }, "last_serial": 1935261, "releases": { "0.3.0": [], "0.3.2": [ { "comment_text": "", "digests": { "md5": "e19c7bff8005f2c2da54166fa437cb2d", "sha256": "a7765fe1290e182df0d231f1e63a8a016b880ac45fea13a3eeffbf26c3e3629c" }, "downloads": -1, "filename": "django_accept_header-0.3.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "e19c7bff8005f2c2da54166fa437cb2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17408, "upload_time": "2016-02-02T09:12:06", "url": "https://files.pythonhosted.org/packages/46/bf/c10ce3c5bd225f792de571241932ee4634a5b33e629d3170530c33b93f46/django_accept_header-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1126dae9dc1b73f990f70417b1aaf237", "sha256": "343f1b1230ad06f4ba3165b07781476df4dfe00f725c07f9a57e032f7ae712a9" }, "downloads": -1, "filename": "django-accept-header-0.3.2.tar.gz", "has_sig": true, "md5_digest": "1126dae9dc1b73f990f70417b1aaf237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11813, "upload_time": "2016-02-02T09:20:36", "url": "https://files.pythonhosted.org/packages/f7/45/0b8380ae5545ff4d893571bf24746130c5bd2a4b141e3c645e1a2e5dac4a/django-accept-header-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e19c7bff8005f2c2da54166fa437cb2d", "sha256": "a7765fe1290e182df0d231f1e63a8a016b880ac45fea13a3eeffbf26c3e3629c" }, "downloads": -1, "filename": "django_accept_header-0.3.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "e19c7bff8005f2c2da54166fa437cb2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17408, "upload_time": "2016-02-02T09:12:06", "url": "https://files.pythonhosted.org/packages/46/bf/c10ce3c5bd225f792de571241932ee4634a5b33e629d3170530c33b93f46/django_accept_header-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1126dae9dc1b73f990f70417b1aaf237", "sha256": "343f1b1230ad06f4ba3165b07781476df4dfe00f725c07f9a57e032f7ae712a9" }, "downloads": -1, "filename": "django-accept-header-0.3.2.tar.gz", "has_sig": true, "md5_digest": "1126dae9dc1b73f990f70417b1aaf237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11813, "upload_time": "2016-02-02T09:20:36", "url": "https://files.pythonhosted.org/packages/f7/45/0b8380ae5545ff4d893571bf24746130c5bd2a4b141e3c645e1a2e5dac4a/django-accept-header-0.3.2.tar.gz" } ] }