This is my apps:
user
students
university
Now, how to use same names for two model ? for instance each student and university have profile model. At first when i do "Class Profile" under student
It gets a new table named student_profile
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
now in students app i can user
student_profile = request.user.profile
But how to do the same for university ? The table gets created like
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
But how to use on views ?
university_profile = request.user.profile
How to use the app name when calling user.request.profile ?