Hi There! Starting out with Django, and was looking for a bit of guidance. I am trying to establish a Organizational structure for employee/supervisor type relationships. Since each of these individuals will be a user, I am extending trying to also take advantage of django's built-in contrib.auth package.
In Short, employees report to supervisors, and in turn supervisors in themselves can report to their respective supervisors... I developed the following models, but was curious if there might be a better way to do this: class Supervisor(models.Model): supervisor = models.OneToOneField(User) def __unicode__(self): return self.supervisor.username class Employee(models.Model): employee = models.OneToOneField(User) supervisor = models.ForeignKey(Supervisor) def __unicode__(self): return self.employee.username Thank you! -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3c6cac23-7218-4c14-8039-2764217f6aad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.