2👍
✅
The error message "No location found matching the query"
suggests that the url pattern is correct, but there is no location with pk=1
in the database. You probably deleted it.
Try a different url e.g. /location/2/detail/
for a primary key that definitely exists.
You can find a primary key by doing something like Location.objects.first().id
in the shell, or simply clicking on a location in the Django admin, and looking at the url.
Source:stackexchange.com