Re: [Django] #21177: redirect() doesn't support redirecting to relative urls

2014-02-15 Thread Django
#21177: redirect() doesn't support redirecting to relative urls
-+-
 Reporter:  acatton@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  redirect url | Triage Stage:  Accepted
  relative   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Tim Graham ):

 In [changeset:"8251438cb8c1d47779e9fc33cfa84dad9851a774"]:
 {{{
 #!CommitTicketReference repository=""
 revision="8251438cb8c1d47779e9fc33cfa84dad9851a774"
 Moved relative URL handling added in refs #21177 to a better place.

 Thanks apollo13: "reverse() shouldn't know about absolute/relative paths."
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/079.be2af4d6651d348110db599636ff9ec0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21177: redirect() doesn't support redirecting to relative urls

2014-02-14 Thread Django
#21177: redirect() doesn't support redirecting to relative urls
-+-
 Reporter:  acatton@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  redirect url | Triage Stage:  Accepted
  relative   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In e3d0790bd0b036ed3589659c1196e2c571e3dd8e:

 Fixed #21177 -- Made resolve_url support relative URLs.

 This fixes redirecting to relative URLs with django.shortcuts.redirect.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/079.0f7dfa4c070d13f20951b7b433a649a7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21177: redirect() doesn't support redirecting to relative urls

2014-01-20 Thread Django
#21177: redirect() doesn't support redirecting to relative urls
-+-
 Reporter:  acatton@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  redirect url | Triage Stage:  Accepted
  relative   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by acatton@…):

 Is it possible to get this in master before Django 1.7?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/079.88fcf4735ac434a1a7669bf44777f616%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21177: redirect() doesn't support redirecting to relative urls

2013-10-01 Thread Django
#21177: redirect() doesn't support redirecting to relative urls
-+-
 Reporter:  acatton@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  redirect url | Triage Stage:  Accepted
  relative   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by EvilDMP):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/079.84d36d9c3944c42e66e9fd4ed2bd5ce2%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21177: redirect() doesn't support redirecting to relative urls

2013-09-26 Thread Django
#21177: redirect() doesn't support redirecting to relative urls
-+---
 Reporter:  acatton@…|  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Core (URLs)  |Version:  master
 Severity:  Normal   |   Keywords:  redirect url relative
 Triage Stage:  Unreviewed   |  Has patch:  1
Easy pickings:  0|  UI/UX:  0
-+---
 Hi,

 If we use redirect shortcut to redirect to a relative URL, it fails.

 Like in this example:
 {{{
 from django.conf.urls import patterns, url
 from django.shortcuts import redirect

 Using redirect to red

 urlpatterns = patterns('',
 url(r'^foo/bar/$', lambda request: redirect('../baz/')),
 )
 }}}

 It raises a TypeError:

 {{{
 Traceback (most recent call last):
   File "lib/python2.7/site-packages/django/core/handlers/base.py", line
 115, in get_response
 response = callback(request, *callback_args, **callback_kwargs)
   File "foo/foo/urls.py", line 9, in 
 url(r'^foo/bar/$', lambda request: redirect('../baz/')),
   File "lib/python2.7/site-packages/django/shortcuts/__init__.py", line
 78, in redirect
 return redirect_class(resolve_url(to, *args, **kwargs))
   File "lib/python2.7/site-packages/django/shortcuts/__init__.py", line
 151, in resolve_url
 return urlresolvers.reverse(to, args=args, kwargs=kwargs)
   File "lib/python2.7/site-packages/django/core/urlresolvers.py", line
 496, in reverse
 return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args,
 **kwargs))
   File "lib/python2.7/site-packages/django/core/urlresolvers.py", line
 379, in _reverse_with_prefix
 lookup_view = get_callable(lookup_view, True)
   File "lib/python2.7/site-packages/django/utils/functional.py", line 31,
 in wrapper
 result = func(*args)
   File "lib/python2.7/site-packages/django/core/urlresolvers.py", line 97,
 in get_callable
 mod = import_module(mod_name)
   File "lib/python2.7/site-packages/django/utils/importlib.py", line 28,
 in import_module
 raise TypeError("relative imports require the 'package' argument")

 }}}

 However, it looks like there's support for relative URL:

 * https://code.djangoproject.com/ticket/987
 *
 
https://github.com/django/django/blob/636860fbfb4e34e08749d4576bc9571028150526/django/core/handlers/base.py#L24
 *
 
https://github.com/django/django/blob/51ed1ef1d56b383210830f69594b789ab3457b95/django/shortcuts/__init__.py#L151


 Here's my proposed patch in this case:
 https://github.com/django/django/pull/1670/files

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.184c1e037f1152efa455fcae37a663dc%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.