diff options
| author | Erik Romijn <eromijn@solidlinks.nl> | 2014-08-02 10:26:08 +0200 |
|---|---|---|
| committer | Erik Romijn <eromijn@solidlinks.nl> | 2014-08-02 10:26:08 +0200 |
| commit | 893f188386cf156ce90cafbc136e335da16f8247 (patch) | |
| tree | 3f50c3347e9d3ee74092241351d42e1d256a9cb4 /docs/intro/tutorial02.txt | |
| parent | ee0208108bd66cec04b28aca76eb506d9a2e1fd3 (diff) | |
[1.7.x] Fixed #23148 -- Minor tweaks in tutorial code samples
Backport of e075d2e66baae98c5b5c06bff384665ab50e0223 from master.
Diffstat (limited to 'docs/intro/tutorial02.txt')
| -rw-r--r-- | docs/intro/tutorial02.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index 4c5e869f8d..653090b6d6 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -275,8 +275,8 @@ with the admin just as we did with ``Question``. That's easy: :filename: polls/admin.py from django.contrib import admin - from polls.models import Choice - + from polls.models import Choice, Question + # ... admin.site.register(Choice) Now "Choices" is an available option in the Django admin. The "Add choice" form @@ -319,8 +319,7 @@ registration code to read: class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), - ('Date information', {'fields': ['pub_date'], - 'classes': ['collapse']}), + ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), ] inlines = [ChoiceInline] |
