What is a django QuerySet?

Posted by gath on Stack Overflow See other posts from Stack Overflow or by gath
Published on 2011-01-13T14:36:48Z Indexed on 2011/01/13 22:53 UTC
Read the original article Hit count: 235

Filed under:

Guys,

When i do this

>>> b = Blog.objects.all()
>>> b

i get this

>>>[<Blog: Blog Title>,<Blog: Blog Tile>]

When i query what type b is,

>>> type(b)

i get this

>>> <class 'django.db.models.query.QuerySet'>

What does this mean? is it a data type like dict, list etc?

An example of how i can build data structure like a QuerySet will be appreciated.

I would want to know how django build that QuerySet (the gory details)

Gath.

© Stack Overflow or respective owner

Related posts about django