Re: Nice representation for Querying with ForeignKeys

2008-08-28 Thread Abe
If B has __unicode__ defined and the output is printed somehow, then it should display the output of __unicode__ whenever this happens. If this isn't being used in a string somehow, then just run a loop over the query set. --~--~-~--~~~---~--~~ You received this

Nice representation for Querying with ForeignKeys

2008-08-27 Thread johnny
Hi, This should be a simple question but I just couldn't seem to find the answer. I have a simple 2 model relationship: class B(models.Model): bfield = models.CharField(...) class A(models.Model): afield = models.CharField(...) bfieldFK = models.ForeignKey(B) what is the best

Nice representation for Querying with ForeignKeys

2008-08-27 Thread johnny
Hi, This should be a simple question but I just couldn't seem to find the answer. I have a simple 2 model relationship: class B(models.Model): bfield = models.CharField(...) class A(models.Model): afield = models.CharField(...) modelB = models.ForeignKey(B) what is the best way