Re: confused over using ORM in view/template

2007-10-03 Thread James Bennett
On 10/3/07, staff-gmail <[EMAIL PROTECTED]> wrote: > So my question was how do I do ORM in a view ?? Where is "choice_set" > coming from ?? http://www.djangoproject.com/documentation/db-api/#backward -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~

Re: confused over using ORM in view/template

2007-10-03 Thread Chris Brand
Chris Brand wrote: > staff-gmail wrote: >> Where is "choice_set" coming from ?? > That one's easy - > http://www.djangoproject.com/documentation/db-api/#backward > > Chris > Oh, and the explanation for it's use in a template is at http://www.djangoproject.com/documentation/templates/#variables

Re: confused over using ORM in view/template

2007-10-03 Thread Chris Brand
staff-gmail wrote: > Where is "choice_set" coming from ?? That one's easy - http://www.djangoproject.com/documentation/db-api/#backward Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: confused over using ORM in view/template

2007-10-03 Thread Malcolm Tredinnick
On Wed, 2007-10-03 at 12:40 -0600, staff-gmail wrote: > So my question was how do I do ORM in a view ?? See [1] where it explains how dotted references are mapped back to Python objects. > Where is "choice_set" > coming from ?? Based on the name and the examples shown, it's related to the one

Re: confused over using ORM in view/template

2007-10-03 Thread staff-gmail
So my question was how do I do ORM in a view ?? Where is "choice_set" coming from ?? I'm just looking for some very practical answers so I can get something working - and if I'm a fairly bright guy and can't figure it out, obviously there's some improvement required - and maybe I will contr

Re: confused over using ORM in view/template

2007-10-03 Thread Malcolm Tredinnick
On Wed, 2007-10-03 at 11:22 -0600, staff-gmail wrote: [...] > Honestly, the official tutorial needs to be re-written. The tutorial is for people wanting a step-by-step introduction to a basic project. If you want more information, we have truckloads of reference documentation for people to read.

confused over using ORM in view/template

2007-10-03 Thread staff-gmail
I'm totally confused over how Django uses ORM relationships when listing out data. Let's use the "writing your first app" though I think it's not a very good example. Okay, in the models we have some fields: Poll.question Choice.poll (foreign key) Choice.choice Choice.votes So in a view you c