[Answer]-Django User model extended for employee. How to access the employee attribute in change_form of model admin?

1👍

You can do this by setting the related_name argument for the OneToOneField.

user = models.OneToOneField(User, related_name=”employee_profile”)

To access the extension field, you use

request.user.employee_profile.extension

Leave a comment