diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
index d24e19c..0f472f4 100644
|
a
|
b
|
Save these changes and start a new Python interactive shell by running
|
| 647 | 647 | >>> Poll.objects.filter(question__startswith='What') |
| 648 | 648 | [<Poll: What's up?>] |
| 649 | 649 | |
| 650 | | # Get the poll whose year is 2012. |
| 651 | | >>> Poll.objects.get(pub_date__year=2012) |
| | 650 | # Get the poll that was published this year. |
| | 651 | >>> from django.utils import timezone |
| | 652 | >>> Poll.objects.get(pub_date__year=timezone.now().year) |
| 652 | 653 | <Poll: What's up?> |
| 653 | 654 | |
| 654 | 655 | # Request an ID that doesn't exist, this will raise an exception. |
| … |
… |
Save these changes and start a new Python interactive shell by running
|
| 699 | 700 | # The API automatically follows relationships as far as you need. |
| 700 | 701 | # Use double underscores to separate relationships. |
| 701 | 702 | # This works as many levels deep as you want; there's no limit. |
| 702 | | # Find all Choices for any poll whose pub_date is in 2012. |
| 703 | | >>> Choice.objects.filter(poll__pub_date__year=2012) |
| | 703 | # Find all Choices for any poll whose pub_date is in this year. |
| | 704 | >>> Choice.objects.filter(poll__pub_date__year=timezone.now().year) |
| 704 | 705 | [<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>] |
| 705 | 706 | |
| 706 | 707 | # Let's delete one of the choices. Use delete() for that. |