the question is r'^order_by_(?P<order_by>-?(title|attachment|date))/(?P<page>[0-9]+)/',
regex error On 7/29/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Sun, 2007-07-29 at 06:55 +0000, ZhangshenPeng wrote: > > when you use url pattern [a-z]+ and named it , then use in {% url > > %} ,everything is all right . > > when I change > > [a-z]+ > > into > > (title|attachment|date) > > django report error "unbalanced parenthesis". > > how to fix my code to do the right thing ? > > think > > > > code as below > > ####################################################### > > url.py: > > > > urlpatterns = patterns('', > > url( > > r'^order_by_(?P<order_by>-?(title|attachment|date))/(? > > P<page>[0-9]+)/', > > object_list, > > name="white_paper_list" > > ), > > ) > > I suspect this is caused by the slightly limited reverse reg-exp parsing > we have at the moment. Ticket #2977 has a patch to try and fix this. > Hopefully I'll be checking in something very close to that this week. In > the meantime, you might want to try the patch on your local system to > see if it does handle that case. > > Regards, > Malcolm > > > > > > -- [EMAIL PROTECTED] 13585201588 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---