>  r'^order_by_(?P<order_by>-?(title|attachment|date))/(?P<page>[0-9]+)/',
> 
> regex error


While I'm not sure on it, you might try making that a
non-capturing group using "(?:...)":

r'^order_by_(?P<order_by>-?(?:title|attachment|date))/(?P<page>[0-9]+)/'

which may be less ambiguous to a reverse regexp-parser (which it
sounds like might be used here).  However, with multiple
possibilities, reversal of the regexp may not be feasible.  You
may have to uglify them as multiple URLs:

r'^order_by_(?P<order_by>-?title)/(?P<page>[0-9]+)/'
r'^order_by_(?P<order_by>-?attachment)/(?P<page>[0-9]+)/'
r'^order_by_(?P<order_by>-?date)/(?P<page>[0-9]+)/'

in your urls.py that they're more uniquely identifiable...even if
they each point to the same view.

-tim






--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to