mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
[1.7.x] Replaced urllib/urlparse imports with from django.utils.six.moves.
Backport of 981b864fbd
from master
This commit is contained in:
parent
5268d71f18
commit
07c42cee7f
4 changed files with 4 additions and 15 deletions
|
@ -166,9 +166,9 @@ A :class:`ResolverMatch` object can also be assigned to a triple::
|
|||
One possible use of :func:`~django.core.urlresolvers.resolve` would be to test
|
||||
whether a view would raise a ``Http404`` error before redirecting to it::
|
||||
|
||||
from urlparse import urlparse
|
||||
from django.core.urlresolvers import resolve
|
||||
from django.http import HttpResponseRedirect, Http404
|
||||
from django.utils.six.moves.urllib.parse import urlparse
|
||||
|
||||
def myview(request):
|
||||
next = request.META.get('HTTP_REFERER', None) or '/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue