Code

Opened 4 years ago

Closed 4 years ago

#12266 closed (worksforme)

tutorial02: Error in fieldset data structure

Reported by: roelschlaeger Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Running '1.2 pre-alpha' on Windows

In http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02

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

admin.site.register(Poll, PollAdmin)

didn't work, but

class PollAdmin(admin.ModelAdmin):

    fieldsets = [
        (None,                  {'fields': ('question',)}),
        ('Date Information',    {'fields': ('pub_date',)}),
    ]

admin.site.register(Poll, PollAdmin)

did.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

What exactly did "didn't work" look like? It works for me: I just tested it, on Windows, running recent trunk-level code, with cut-and-paste of the version you say "didn't work", and it appears to work fine.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.