Models
Using Models
Importing
from polls.models import Choice, QuestionQuerying
Question.objects.all() #<QuerySet []>
Question.objects.filter(id=1)
Question.objects.filter(question_text__startswith='What')
# Identical
Question.objects.get(pk=1)
Question.objects.get(id=1)
Question.objects.get(pub_date__year=timezone.now().year) #Will throw error if doesn't existQuerying through relations
Creation
Children
Delete
Creating New Model
Migrations
Last updated