Re: User id foreign key

2007-03-12 Thread Russell Keith-Magee
On 3/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > You have to do something like this in your model: > user_created = models.ForeignKey(User, related_name="user_created") > > Then instead of saying User.entry_set .. I think its just > user_created_set ... but not positive on that. Almos

Re: User id foreign key

2007-03-11 Thread [EMAIL PROTECTED]
You have to do something like this in your model: user_created = models.ForeignKey(User, related_name="user_created") Then instead of saying User.entry_set .. I think its just user_created_set ... but not positive on that. You have to do this normally when you have two ForeignKeys on the same cl

Re: User id foreign key

2007-03-11 Thread Christian Hoeppner
Thanks a whole bunch! I got another error, saying like so: blog.entry: Accessor for field 'user_created' clashes with related field 'User.entry_set'. Add a related_name argument to the definition for 'user_created'. But I guess I can find out on my own. If anyone wants to reply for the sake of

Re: User id foreign key

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 18:07 +, Christian Hoeppner wrote: > Hi there! > > I wonder if there's a way to link a user to some kind of database entry > using a foreign key field. The problem is, how would I define something > like this? What's the actual name/path/something I use to reference the

User id foreign key

2007-03-10 Thread Christian Hoeppner
Hi there! I wonder if there's a way to link a user to some kind of database entry using a foreign key field. The problem is, how would I define something like this? What's the actual name/path/something I use to reference the auth_user objects? Thanks! -- Chris M. Hoeppner Web design & consulta