{ "info": { "author": "Axel Haustant", "author_email": "noirbizarre+absolute@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Software Distribution" ], "description": "Django Absolute\n===============\n\n.. image:: https://secure.travis-ci.org/noirbizarre/django-absolute.png\n :target: http://travis-ci.org/noirbizarre/django-absolute\n\nDjango Absolute provides context processors and template tags to use full absolute URLs in templates.\n\nInstallation\n------------\n\nYou can install Django Absolute with pip:\n\n::\n\n pip install django-absolute\n\nor with easy_install:\n\n::\n\n easy_install django-absolute\n\n\nAdd ``absolute`` to your ``settings.INSTALLED_APPS``.\n\n\nContext processor\n-----------------\n\nAdd ``absolute.context_processors.absolute`` to your ``settings.TEMPLATE_CONTEXT_PROCESSORS``.\nDjango Absolute context processor depends on request context processor:\n\n::\n\n from django.conf import global_settings\n\n TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (\n 'django.core.context_processors.request',\n 'absolute.context_processors.absolute',\n )\n\nThen you can access the following variables in your templates:\n\n* ``ABSOLUTE_ROOT``: full absolute root URL (without trailing slash) based on incoming request\n* ``ABSOLUTE_ROOT_URL``: full absolute root URL (with trailing slash) based on incoming request\n* ``SITE_ROOT``: full absolute root URL (without trailing slash) based on current Django Site\n* ``SITE_ROOT_URL``: full absolute root URL (with trailing slash) based on current Django site\n\n\nTemplate tags\n-------------\n\nDjango absolute provide 2 template tags:\n\n* ``absolute``: acts like ``url`` but provide a full URL based on incoming request.\n* ``site``: acts like ``url`` but provide a full URL based on current Django Site.\n\nTo use theses template tags, you need to load the ``absolute`` template tag library.\n\n::\n\n {% load absolute %}\n\n {% url index %}\n {% absolute index %}\n {% site index %}\n\nThese template tags have exactly the same syntax as ``url``, including the \"`as`\" syntax:\n\n::\n\n {% absolute index as the_url %}\n {{ the_url }}\n\n\nIf you use Django 1.5, you need to use the \"new-style\" url syntax (quoted parameters):\n\n::\n\n {% load absolute %}\n\n {% url \"index\" %}\n {% absolute \"index\" %}\n {% site \"index\" %}\n\n {% absolute \"index\" as the_url %}\n {{ the_url }}\n\n\nIf you want to match the \"new-style\" syntax in Django < 1.5 you need to load ``absolute_future`` instead (same behavior as ``{% load url from future %}``).\n\n::\n\n {% load url from future %}\n {% load absolute_future %}\n\n {% url \"index\" %}\n {% absolute \"index\" %}\n {% site \"index\" %}\n\n {% absolute \"index\" as the_url %}\n {{ the_url }}\n\nFor more informations, see the `Django 1.5 release notes `_.\n\nChangelog\n=========\n\n0.3 (2013-03-03)\n----------------\n\n- Check if django.contrib.sites is enabled (thanks to Rodrigo Primo)\n- Django 1.5 compatibility (Documentation and tests)\n- Added ``absolute_future`` template tag library\n (match ``{% load url from future %}`` syntax).\n- drop support for Python 2.6 (test only)\n\n\n0.2.2 (2012-11-18)\n------------------\n\n- Handle template tag `as` syntax\n\n\n0.2.1 (2012-11-10)\n------------------\n\n- Fix packaging\n\n\n0.2 (2012-11-10)\n----------------\n\n- ``{% site %}`` fallback on http protocol if ``request`` is missing.\n\n\n0.1 (2012-06-10)\n----------------\n\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/django-absolute", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/noirbizarre/django-absolute", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "django-absolute", "package_url": "https://pypi.org/project/django-absolute/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-absolute/", "project_urls": { "Download": "http://pypi.python.org/pypi/django-absolute", "Homepage": "https://github.com/noirbizarre/django-absolute" }, "release_url": "https://pypi.org/project/django-absolute/0.3/", "requires_dist": null, "requires_python": null, "summary": "Absolute URLs tools for django", "version": "0.3" }, "last_serial": 732292, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a3fcbd4afd2fd9ba8339725e040f3ce8", "sha256": "1ca930e1cb0950e736e9e934503e3430f583eec24bbf19e3ad7541677d8e9001" }, "downloads": -1, "filename": "django-absolute-0.1.tar.gz", "has_sig": false, "md5_digest": "a3fcbd4afd2fd9ba8339725e040f3ce8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6168, "upload_time": "2012-06-10T20:50:20", "url": "https://files.pythonhosted.org/packages/93/4b/47fb4b5621fec2253d049c2be29f4381d3feb02550545da6b843f02afefd/django-absolute-0.1.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "72b3d9cc6e5fbbd41e32ae6d4303451e", "sha256": "b1fd8eddedba9598fd1bbfe64f68a6cab99af9bd6794a9b01f2e37a4b29a2071" }, "downloads": -1, "filename": "django-absolute-0.2.1.tar.gz", "has_sig": false, "md5_digest": "72b3d9cc6e5fbbd41e32ae6d4303451e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9296, "upload_time": "2012-11-10T20:28:16", "url": "https://files.pythonhosted.org/packages/3b/3c/eb321dc1342a521f9dc6134b7ee9335dfc07824ea4d9fd3527c87de39bf5/django-absolute-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a4d25a7084fbf852c6dc3c5c3150c956", "sha256": "0d3b014dc86a7f9500885b984ef3ca29f05d830e455418b604ea1c813d864256" }, "downloads": -1, "filename": "django-absolute-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a4d25a7084fbf852c6dc3c5c3150c956", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9570, "upload_time": "2012-11-18T17:36:46", "url": "https://files.pythonhosted.org/packages/74/d7/c4dc6e4858dc4a6f43fdd9d075dbfcc924888baffdbc4837ebd69725fbfb/django-absolute-0.2.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "bd17b1cecc6e7a9db96e550ec373426d", "sha256": "41ad9c819c80539cd604b9dea5c735252476616f071d739a8638aa9307df5857" }, "downloads": -1, "filename": "django-absolute-0.3.tar.gz", "has_sig": false, "md5_digest": "bd17b1cecc6e7a9db96e550ec373426d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10042, "upload_time": "2013-03-03T01:39:38", "url": "https://files.pythonhosted.org/packages/18/02/77ed5333f547ac95243bd0598372a338340536dfa5bfee3ed5753fa01b75/django-absolute-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd17b1cecc6e7a9db96e550ec373426d", "sha256": "41ad9c819c80539cd604b9dea5c735252476616f071d739a8638aa9307df5857" }, "downloads": -1, "filename": "django-absolute-0.3.tar.gz", "has_sig": false, "md5_digest": "bd17b1cecc6e7a9db96e550ec373426d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10042, "upload_time": "2013-03-03T01:39:38", "url": "https://files.pythonhosted.org/packages/18/02/77ed5333f547ac95243bd0598372a338340536dfa5bfee3ed5753fa01b75/django-absolute-0.3.tar.gz" } ] }