So I\'ve extended my user with the field score
like this:
models.py:
class UserProfile(models.Model):
user = models.OneToOneField(Us
I'm a bit kinda late for this but ill just, share the solution that worked for me on Django 3.0.8...
Error : RelatedObjectDoesNotExist: User has no profile
This the is where my error was directing me to :
@login_required
def dashboard(request):
if request.method == 'POST':
user_form = UserEditForm(instance=request.user, data=request.POST)
profile_form = ProfileEditForm(instance=request.user.profile, data=request.POST, files=request.FILES)
Note: You have to login or your profile to be saved.
Just after creating your account, you should be able to see that you are not logged in and you will have to log in to for your profile be saved and to start working.