46👍
✅
Your parameter ?P<id>
in the URL mapping has to match the arguments in the view def person_detail(request, person):
They should both be id
or both person
.
11👍
You should fix the view and use the id
argument name instead of person
:
def person_detail(request, id):
- [Django]-How can I test binary file uploading with django-rest-framework's test client?
- [Django]-Django Rest Framework – Could not resolve URL for hyperlinked relationship using view name "user-detail"
- [Django]-Django template convert to string
0👍
My mistake was I only added the first parameter instead of both,i.e I mentioned def person_detail(request)
instead of def person_detail(request,id)
- [Django]-Simple way to reset Django PostgreSQL database?
- [Django]-Django accessing ManyToMany fields from post_save signal
- [Django]-How to add column in ManyToMany Table (Django)
Source:stackexchange.com