[Answer]-"invalid literal for int() with base 10:'username'"

1👍

I’m going to guess that the user field in the UserProfile model is a ForeignKey/OneToOne to auth.User.

If it is, then you’ll need to modify your filter to join on the actually username of the auth.User model.

person = UserProfile.objects.get(user__username=username)

Leave a comment