Reputation: 243
project urls.py:
url(r'^landlord/',include('Landlord.urls',namespace="landlord")),
landlord app urls.py:
url(r'^edit/$', views.edit_property, name="edit_property"),
url(r'^edit/(?P<id>[-\w]+)/$', views.edit_property_form, name="edit_property_form"),
The url written in the browser is "landlord/edit/?id=1". But it is resolving to first url only.
Upvotes: 0
Views: 79
Reputation: 36033
/(?P<id>[-\w]+)/
is not a query parameter, it's part of the main URL. It's expecting a URL like landlord/edit/1/
.
Upvotes: 3