Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
djangorestframework / __pycache__ / reverse.cpython-35.pyc
Size: Mime:


£WXÄã@sËdZddlmZddlmZddlmZddlmZ	ddlm
Z
ddlmZddl
mZd	d
d„Zd	d	d	d	dd
„Zd	d	d	d	dd„ZeeejƒZd	S)zN
Provide urlresolver functions that return fully qualified URLs or view names
é)Úunicode_literals)Úsix)Úlazy)Úreverse)ÚNoReverseMatch)Úapi_settings)Úreplace_query_paramNcCse|dkr|Stjg}xB|D]:}|r#||jkr#|j|}t|||ƒ}q#W|S)z
    Given an incoming request, and an outgoing URL representation,
    append the value of any built-in query parameters.
    N)rÚURL_FORMAT_OVERRIDEÚGETr)ÚurlÚrequestÚ	overridesÚparamÚvalue©rúU/Users/carlton/Documents/Django-Stack/django-rest-framework/rest_framework/reverse.pyÚpreserve_builtin_query_paramss

rc
Ks›t|ddƒ}|dk	rsy"|j||||||}WqŽtk
rot||||||}YqŽXnt||||||}t||ƒS)z®
    If versioning is being used then we pass any `reverse` calls through
    to the versioning scheme instance, so that the resulting URL
    can be modified if needed.
    Úversioning_schemeN)ÚgetattrrrÚ_reverser)ÚviewnameÚargsÚkwargsrÚformatÚextraÚschemerrrrr#s"
#rcKsT|dk	r"|pi}||d<t|d|d||}|rP|j|ƒS|S)z•
    Same as `django.urls.reverse`, but optionally takes a request
    and returns a fully qualified URL, using the request to get the base URL.
    Nrrr)Údjango_reverseÚbuild_absolute_uri)rrrrrrrrrrr7s

r)Ú__doc__Ú
__future__rÚdjango.utilsrÚdjango.utils.functionalrÚrest_framework.compatrrrÚrest_framework.settingsrZrest_framework.utils.urlsrrrÚ	text_typeÚreverse_lazyrrrrÚ<module>s