#12950: urlresolvers.reverse returns '/$' when including namespaced '^$' 
pattern at
root '^$'
-------------------------------------+--------------------------------------
          Reporter:  ungenio         |         Owner:  nobody                   
     
            Status:  reopened        |     Milestone:                           
     
         Component:  Core framework  |       Version:  1.2-beta                 
     
        Resolution:                  |      Keywords:  urlresolvers reverse 
namespace
             Stage:  Accepted        |     Has_patch:  0                        
     
        Needs_docs:  0               |   Needs_tests:  0                        
     
Needs_better_patch:  0               |  
-------------------------------------+--------------------------------------
Comment (by SmileyChris):

 Normal:
 {{{
 #!python
 incpatterns = patterns('',
     url(r'^$', 'views.front', name='index'),
 )
 urlpatterns = patterns('views',
     (r'test?/', include(incpatterns)),
 )

 >>> reverse('index')
 '/tes/
 }}}

 Namespaced:
 {{{
 #!python
 incpatterns = patterns('',
     url(r'^$', 'views.front', name='index'),
 )
 urlpatterns = patterns('views',
     (r'test?/', include(incpatterns, namespace='myapp')),
 )

 >>> reverse('myapp:index')
 '/test?/
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12950#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to