Hi Ed.
I recommend you link all your people roles to a User (It already has Full
name and e-mail fields)
--
from django.contrib.auth.models import User
class Student(models.Model):
user = models.ForeignKey(User, unique=True)
class Teacher(models.Model):
user = models.ForeignKey(User, unique=True)
class UserProfile(models.Model):
first_name = models.CharField()
last_name = models.CharField()
home_address= models.TextField()
phone = models.PhoneNumberField()
user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR,
num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_change=0)
--
if you want the user profile to replace the standar user profile on the
admin, add also:
AUTH_PROFILE_MODULE = 'myapp.UserProfile'
to your settings.py
Note: The user profile part was taken from this useful blog entry on James
Bennet site:
http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model
I link the models the way I want to with a unique ForeignKey (or at
> least I think I do), but the inline editing is backwards and illogical
> (and doesn't work anyway). That is, for each of the person types, I
> want to edit the fields of a Profile instance inline, not the other
> way around.
>
> Does that make sense? If so, any suggestions on how to do what I want,
> or how to rethink the problem?
Yes, it is intendend to work that way.
I hope this helps you.
Ariel.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---