﻿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
17716	include(arg, namespace=None, app_name=None) replace app_name with namespace	blackip@…	nobody	"When we register urls - we can specify app_name like this

urlpatterns = patterns('',
    url(r'^inventory/', include('inventory.urls', app_name='inventory')),
    url(r'^cart/', include('cart.urls',app_name='cart')),

Then we can use reverse method or {% url cart:cart  %} to generate url.

But it does not work - ''got NoReverseMatch at /cart/

u'cart' is not a registered namespace
Request Method:	GET
Request URL:	http://localhost:8000/cart/
Django Version:	1.4a1
''

When I register urls like this

    url(r'^inventory/', include('inventory.urls', namespace='inventory')),
    url(r'^cart/', include('cart.urls',namespace='cart')),

IT DOES WORK !

According to documentation format for urls should be

{% url app_name:view_name  %}
but actual format is
{% url namespace:view_name  %}

I think this is a bug
 


The source of bug may be in 

file /usr/local/lib/python2.7/site-packages/django/conf/urls/__init__.py
function include(arg, namespace=None, app_name=None)

It returns tuple (urlconf_module, app_name, namespace)
It looks like it should be (urlconf_module, namespace, app_name) "	Bug	new	Core (URLs)	1.4-alpha-1	Normal		include reverse url		Unreviewed	0	0	0	0	0	0
