0👍
✅
QuerySet.get()
doesn’t return None
if no record is found. As the documentation says, it raises DoesNotExist
. Catch the exception.
1👍
- [Answer]-Can not upload file in django app
- [Answer]-Rasing a 401 in a custom authentication methoud for Django
- [Answer]-Load common content for the whole Django site
- [Answer]-Django Model/Database Design
Source:stackexchange.com