Explicitly telling django that the reverse OneToOne relationship doesn't exist

2011-03-14 Thread Viktor Kojouharov
Hello, I have a database function that returns the necessary data for constructing a bunch of related objects in one go. One of the objects has a OneToOne relationship with my main model instance, and it doesn't exists for every object of the main model. Since the main model has a reverse relat

Re: Reverse OneToOne Relationship

2009-07-13 Thread wickass
Thanks Karen I am slightly embarrassed with this one, You are correct that variant works, the reason I thought it was not working is because the User.first_name fields were empty and they were showing as blanks. :) On Jul 13, 3:54 pm, Karen Tracey wrote: > On Mon, Jul 13, 2009 at 9:28 AM, wi

Re: Reverse OneToOne Relationship

2009-07-13 Thread Karen Tracey
On Mon, Jul 13, 2009 at 9:28 AM, wickass wrote: > > Hi Django users > > I have only been using python& django for about a week, so please > excuse me if this question sounds stupid. > > Basically I have a model which extends the users model via a OneToOne > relationship like so: > > class AgentPr

Reverse OneToOne Relationship

2009-07-13 Thread wickass
Hi Django users I have only been using python& django for about a week, so please excuse me if this question sounds stupid. Basically I have a model which extends the users model via a OneToOne relationship like so: class AgentProfile(models.Model): user = models.OneToOneField(