Hi,

I am creating a tutor-student forum using Django. For which I need to have 
two different user profiles, one for students and one for teachers. 
However, I am unsure about the best way to do this. I am currently 
following the below approach:

class UserProfile:
 user = models.OneToOneField(User, reverse_name="profile")
 #other common Attributes
 class Meta(object):
   abstract = true

class TutorProfile():
 #tutor fields
 class Meta(object):
   abstract = true

class StudentProfile():
  #student fields
  class Meta(object):
   abstract = true

class Profile(TutorProfile, StudentProfile, UserProfile):
  pass


The idea is taken from the Django best practices book. However, I am 
curious if there is any other way with lesser space usage. Any thoughts?

PS: I also asked the same question on stackoverflow 
: 
http://stackoverflow.com/questions/36404889/django-multiple-user-profiles-with-class-based-views-best-practices
 
but didn't get any responses.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/24499b2a-09fb-4dcb-83f4-2684ce9533a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to