On 8/12/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote: > > On Fri, 2006-08-11 at 22:02 -0700, Bryan Murdock wrote: > > First I must admit that I'm a databse dummy. I'm using fairly recent > > django code from svn. I have a simple desire. I want people who can > > be organized into committees, with each committee having a committee > > leader, also a person. I wrote up my models like so: > > > > class Person( models.Model ): > > firstname = models.CharField( maxlength=200 ) > > lastname = models.CharField( maxlength=200 ) > > email = models.EmailField() > > phone_number = models.PhoneNumberField() > > committee = models.ForeignKey( 'Committee' ) > > You shouldn't use the string argument (I mean, I never do that). And > what if one person is in two committees?
That's a constraint that I forgot to mention, that a person should only be a member of one committee (or no committees). Bryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---