[Answer]-Django add new Model and Form in a new app

1👍

Since you already have request.user.get_profile() to return UserProfile model, You are looking for ControlInformation object in this case. So, just change

Current_Status = request.user.get_profile()  

to

Current_Status = ControlInformation.objects.get(user=request.user)

Or,

from django.shortcuts import get_object_or_404
Current_Status = get_object_or_404(ControlInformation, user=request.user)

Leave a comment