hello, i would say that yes it is a bug. i have seen many bugs in the reverse resolver code. for example, it crashes (throws a python exception) if a regex pattern contains question marks (optional elements) and i am sure it has a lot more. my personal opinoin is that this code is simply a hack. :)
konstantin. On May 24, 1:00 pm, Olivier Guilyardi <[EMAIL PROTECTED]> wrote: > Hi, > > In my urls.py I have the following entry: > > url(r'^items/download/(?P<item_id>[0-9A-Za-z._:%?-]+)\.(?P<extension>[0-9a--z]+)$', > web_view.item_export, > name="telemeta-item-export"), > > In my template: > {% url telemeta-item-export item.id|urlencode,format.extension %} > > For item.id = "BM.001:006" and format = "mp3", it produces > /items/download/BM.001%3A006%5C.mp3 > > Which, once url-decoded, is equivalent to (notice the backslash): > /items/download/BM.001:006\.mp3 > > If I access this url I get a "Page not found" with Django complaining about > the > fact it did not match any of the url patterns. > > However, if I manually remove the backslash and access > /items/download/BM.001%3A006.mp3, then it works. > > This seems to mean that the resolver and the reverse resolver are not > symmetrical. Is this a bug? > > Regards, > > -- > Olivier --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---