معرفی شرکت ها


django-absolute-0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Absolute URLs tools for django
ویژگی مقدار
سیستم عامل -
نام فایل django-absolute-0.3
نام django-absolute
نسخه کتابخانه 0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Axel Haustant
ایمیل نویسنده noirbizarre+absolute@gmail.com
آدرس صفحه اصلی https://github.com/noirbizarre/django-absolute
آدرس اینترنتی https://pypi.org/project/django-absolute/
مجوز LGPL
Django Absolute =============== .. image:: https://secure.travis-ci.org/noirbizarre/django-absolute.png :target: http://travis-ci.org/noirbizarre/django-absolute Django Absolute provides context processors and template tags to use full absolute URLs in templates. Installation ------------ You can install Django Absolute with pip: :: pip install django-absolute or with easy_install: :: easy_install django-absolute Add ``absolute`` to your ``settings.INSTALLED_APPS``. Context processor ----------------- Add ``absolute.context_processors.absolute`` to your ``settings.TEMPLATE_CONTEXT_PROCESSORS``. Django Absolute context processor depends on request context processor: :: from django.conf import global_settings TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( 'django.core.context_processors.request', 'absolute.context_processors.absolute', ) Then you can access the following variables in your templates: * ``ABSOLUTE_ROOT``: full absolute root URL (without trailing slash) based on incoming request * ``ABSOLUTE_ROOT_URL``: full absolute root URL (with trailing slash) based on incoming request * ``SITE_ROOT``: full absolute root URL (without trailing slash) based on current Django Site * ``SITE_ROOT_URL``: full absolute root URL (with trailing slash) based on current Django site Template tags ------------- Django absolute provide 2 template tags: * ``absolute``: acts like ``url`` but provide a full URL based on incoming request. * ``site``: acts like ``url`` but provide a full URL based on current Django Site. To use theses template tags, you need to load the ``absolute`` template tag library. :: {% load absolute %} {% url index %} {% absolute index %} {% site index %} These template tags have exactly the same syntax as ``url``, including the "`as`" syntax: :: {% absolute index as the_url %} {{ the_url }} If you use Django 1.5, you need to use the "new-style" url syntax (quoted parameters): :: {% load absolute %} {% url "index" %} {% absolute "index" %} {% site "index" %} {% absolute "index" as the_url %} {{ the_url }} If 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 %}``). :: {% load url from future %} {% load absolute_future %} {% url "index" %} {% absolute "index" %} {% site "index" %} {% absolute "index" as the_url %} {{ the_url }} For more informations, see the `Django 1.5 release notes <https://docs.djangoproject.com/en/dev/releases/1.5/>`_. Changelog ========= 0.3 (2013-03-03) ---------------- - Check if django.contrib.sites is enabled (thanks to Rodrigo Primo) - Django 1.5 compatibility (Documentation and tests) - Added ``absolute_future`` template tag library (match ``{% load url from future %}`` syntax). - drop support for Python 2.6 (test only) 0.2.2 (2012-11-18) ------------------ - Handle template tag `as` syntax 0.2.1 (2012-11-10) ------------------ - Fix packaging 0.2 (2012-11-10) ---------------- - ``{% site %}`` fallback on http protocol if ``request`` is missing. 0.1 (2012-06-10) ---------------- - Initial release


نحوه نصب


نصب پکیج whl django-absolute-0.3:

    pip install django-absolute-0.3.whl


نصب پکیج tar.gz django-absolute-0.3:

    pip install django-absolute-0.3.tar.gz