I have an object that will be viewed, edited, or added. I would like to give a url for edit/add but default to view if nothing is given. For example:
http://www.example.com/page/edit --> Goes to edit page template http://www.example.com/page/ -- Goes to view template however if i put an argument at the end of the regex, then django expects it and won't accept a null: (r'^folder/(?P<obj_id>\d+)/$', 'content.views.page'), (r'^folder/(?P<obj_id>\d+)/(?P<method>\w+)$', 'content.views.page'), If i leave of the <method> arg, then it won't match when this is present. Are you supposed to have a url line for every single thing you want to do to an object? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---