I have this in URL file
(r'^new/(?P<object_class>\w+)/(?P<action>\w+)/(?P<object_id>\d+)/$', create_object)
NOw for URL like /new/book/edit/5 it is working fine
But if i do /new/book/create then it says nor URL matched.
Is it possible that third argumrent is optional so that i can use one URL rule for above cases
This should do it. (Notice I wrapped
object_idand the/in a(..)?to make it optional)Now
object_idshould be none in the view.