[Answer]-Python. Django1.7 DoesNotExist. Matching query does not exist

1👍

Well your get looks jacked up.

emp = User.objects.get(username = request.user.username)

should probably be something like this.

emp = User.objects.get(id=request.user.id)

You could probably do this to…

emp = User.objects.get(user=request.user)

Leave a comment