Can anyone help with this - I found some code in the QuerySet API
reference
# Hits the database.
e = Entry.objects.select_related().get(id=5)
# Doesn't hit the database, because e.blog has been prepopulated
# in the previous query.
b = e.blog
As opposed to getting a single id, I couldn't find
> Note that I probably made a typo earlier, it should be
> Copy.query_set.all, not Copy.query.all. In case I've continued to get it
> wrong, read the documentation for the queryset API, in particular the
> part about accessing reverse relations.
Thanks Malcolm, i'll check this out and hopefully
paste.com
>
> On Feb 3, 8:54 am, Jon Loyens <jonloy...@gmail.com> wrote:
>
> > Alex, would you mind posting your complete template at dpaste.org for
> > us to look at? It might clarify how you're trying to do the output.
>
> > Thanks,
>
> > Jon.
>
> >
> On Mon, 2009-02-02 at 21:21 -0800, Alexiski wrote:
> > Hi Malcolm,
>
> > Thanks for your response, but I'm not quite sure how to iterate using
> > obj.query.all to get all the instances I'm after.
>
> > Could you please provide a code snippet or direct me to a
com>
wrote:
> On Mon, 2009-02-02 at 20:52 -0800, Alexiski wrote:
> > Hi all,
> > This is a difficulty related to me being new to Django/Python I
> > assume, so I hope you can forgive my ignorance and help me out :)
>
> > I have 4 tables - User(overriding the user object),
Hi all,
This is a difficulty related to me being new to Django/Python I
assume, so I hope you can forgive my ignorance and help me out :)
I have 4 tables - User(overriding the user object), Copy, Query,
QueryClassification. The main tables are Copy and Query. There can be
many Queries for each
6 matches
Mail list logo