Hi Bruno, Thanks for you candor. Yeah. I appreciate I'm not that that great at the moment.
By having the usertype id would therefore make the usertype specific attributes much easier to access, such as showing the usertype name in the templates. So if my usertype model is this: class UserType(models.Model): id = models.CharField(max_length=3, primary_key=True) name = models.CharField(max_length=30) def __unicode__(self): return u'%s' % (self.name) I just have to use this (using a userprofile this time): {{ user.get_profile.usertype }} ... rather than this... if hasattr('user','teacher'): current_type = "Teacher" elif hasattr('user','student'): current_type = "Student" elif ......... everytime I want to find out what type of user I am dealing with. Anyway. Cheers for the code. ALJ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.