#3422: url configuration: include in combination with extra options messes up
reverse resolving
--------------------------------------------------------+-------------------
Reporter:  Jeroen van Dongen <jeroen at jkwadraat.net>  |       Owner:  adrian  
                              
  Status:  new                                          |   Component:  Core 
framework                        
 Version:  SVN                                          |    Keywords:  urls.py 
reverse resolver extra_options
   Stage:  Unreviewed                                   |   Has_patch:  0       
                              
--------------------------------------------------------+-------------------
 Say I have a main urls.py like this:
 {{{
 urlpatterns = patterns('',
     (r'^xxx/weblog/',        include('myapps.blog.urls'), {'weblog_id':
 'foo'}),
     (r'^yyy/weblog/',        include('myapps.blog.urls'), {'weblog_id':
 'bar'}),
 )
 }}}
 
 and in 'myapps.blog.urls' something like this:
 
 {{{
 urlpatterns = patterns('',
     (r'^$',        'myapps.blog.views.index'),
 )
 }}}
 
 Then when a I visit '/yyy/weblog/', the blog's index view would get the
 parameter 'weblog_id' with
 value 'bar' and presents the correct weblog (i.e. the resolver correctly
 finds that it needs to
 use the second line from urls.py).
 
 However when I then do a reverse url lookup in my view, passing
 weblog_id='bar' as parameter,
 it will latch onto the first entry and return '/xxx/weblog/' instead of
 '/yyy/weblog'.
 
 Apperently the reverse resolver does not take the extra options from
 urls.py into account during resolving,
 while the forward resolver does.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3422>
Django Code <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