On Oct 9, 11:22 am, Javier Guerra <jav...@guerrag.com> wrote: > add a second line to your URL mappigs with the third argument: > > (r'^(?P<a>[-\w]+)/(?P<b>[-\w]+)/$', 'model_view'), > (r'^(?P<a>[-\w]+)/(?P<b>[-\w]+)/(?P<c>[-\w]+)/$', 'model_view')
That's the problem. 'c' is not supposed to be visible in the URL itself. A person is only supposed to see /a/b/ when accessing the model's page. The thing is that I'm actually using the same URL pattern for the pages of two different models (not my decision, ugh!). 'c' is actually storing the model type. If 'c' is None, as when the URL is being accessed directly, I'd determine the model type in the view another way (I go through hoops, but it's possible). However, if I have a chance to use one of the model's get_absolue_url methods, I want to specify the model's type in 'c' so that the view knows what model it's working with at the start. Except that Django doesn't like my optional argument. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---