1👍
✅
No, I think django doesn’t have it is because django shouldn’t assume what’s the default value if the query is not found. Do this:
try:
tag = Keyword.objects.get(slug=tag)
except Keyword.DoesNotExist:
tag = None
Source:stackexchange.com