#18576: Missing module in import statement
-------------------------------+---------------------------
     Reporter:  jaaruiz@…      |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Documentation  |    Version:  1.4
     Severity:  Normal         |   Keywords:  wrong example
 Triage Stage:  Unreviewed     |  Has patch:  1
Easy pickings:  0              |      UI/UX:  0
-------------------------------+---------------------------
 A necessary module is not being imported in one of the examples. The
 example is located at
 https://docs.djangoproject.com/en/dev/intro/tutorial02/

 The example code is as follows:

 from django.contrib import admin
 from polls.models import Poll

 class ChoiceInline(admin.StackedInline):
     model = Choice
     extra = 3

 class PollAdmin(admin.ModelAdmin):
     fieldsets = [
         (None,               {'fields': ['question']}),
         ('Date information', {'fields': ['pub_date'], 'classes':
 ['collapse']}),
     ]
     inlines = [ChoiceInline]

 admin.site.register(Poll, PollAdmin)





 The second line of the code should also import the `Choice' model as
 follows:
 from polls.models import Poll, Choice

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18576>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to