1👍
✅
You can define a related_name
for your OneToOneField
, like this:
user = models.OneToOneField(User, related_name='profile')
and then access the corresponding fields using
request.user.profile.car_num
Source:stackexchange.com