﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13371	reverse() causes unnecessary infinite recursion when used in urlconf	nh2	nobody	"Consider

{{{
(r'^$', views.main, {}, 'main'),
(r'^login/$', django.contrib.auth.views.login, {...[parameters]... , 'next': reverse('main')}, 'login'),
}}}

in urlconf.
The idea is easy: After a successful login, redirect to the main view, whatever its URL is (were DRY and don't want to hardcode the URL more than once, right?).

However, we get

{{{
ImproperlyConfigured at /
The included urlconf [myproject].urls doesn't have any patterns in it
}}}


whenever we call reverse([whatever string]) as Django tries to evaluate reverse('main') although it is specified as value for 'next' and therefore cannot be the answer to our url lookup query. As reverse('main') matches reverse([whatever string]), we get an infinite recursion which seems to be catched by an ImproperlyConfigured raise in some way.

Do you agree?"		closed	Uncategorized	1.2-beta		duplicate		nh2@…	Unreviewed	0	0	0	0	0	0
