Malcolm,
Thanks for pointing me in the right direction.  I looked at the Django
FAQ's and read about 'connection.queries'.  Using that I was able to
look at what SQL statements  were being generated.  From that I
noticed that in the FROM clause my table plush_collection was not
being called.  That is why I was getting the error 'no such column
plush_collection.value'.

To fix this problem in my filter statement's I added
select_related().  So I used

 styles = styles.select_related().filter(etc...)

instead of

styles = styles.filter(etc...)

Once I looked at the SQL of that query then I was able to get
information from the different FK's.  I also read that using
select_related() is also a good (In most cases) technique to use to
speed up queries.  I might include depth=1 just to make sure that I
don't go too many levels down.

Thanks

On Oct 21, 10:35 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-10-21 at 08:22 -0700, Greg wrote:
> > Malcolm,
> > I don't know much about how to see what SQL is being produced.  This
> > is probably something I should learn.  Where is the FAQ located at?
>
> Oh, come on! How hard did you look? It's the first hit on Google for
> "Django FAQ", there's also a search button on the docs page on the
> Django website.
>
> Please spend a few minutes trying to answer your own question before
> posting to the list! It might mean people are more willing to help when
> you have a real question.
>
> Malcolm
>
> --
> Why be difficult when, with a little bit of effort, you could be
> impossible.http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to