T
T
tutunak2016-04-16 13:35:27
Django
tutunak, 2016-04-16 13:35:27

Where do objects come from in django?

I am currently learning django. And at the stage of reading djbook I had a misunderstanding. djbook.ru/rel1.9/intro/tutorial02.html - where the example is taken from.
We created models, then imported them (for example, in the console) and then we can get all objects of the Question class (after all, Question is a class) but I don’t understand how works? I don't understand where we get objrects from? inherited from models.Models? but in the source code I didn't find the object object. Tell us where to find it and read about all its methods and properties.
from polls.models import Question, Choice
Question.objects.all()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-04-16
@FireGM

https://docs.djangoproject.com/en/1.9/topics/db/ma...
I advise you to thoroughly study the documentation. There are answers to a lot of questions there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question