Code

Opened 4 years ago

Closed 4 years ago

#14233 closed (invalid)

Documentation for admin is has a reference to meta class

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

Description

The page for contrib.admin still has meta class in an example:

class MyArticleAdminForm(forms.ModelForm):
    class Meta:
        model = Article

    def clean_name(self):
        # do something that validates your data
        return self.cleaned_data["name"]

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Why is this a problem?

comment:2 Changed 4 years ago by peterofthenorse

It’s misleading and confusing. Meta classes aren’t used any more, and we don’t need someone to look at it a wonder what it is. If we change it to albiwry = "The last starfighter" it’ll do the exact same thing.

comment:3 Changed 4 years ago by peterofthenorse

  • Resolution set to invalid
  • Status changed from new to closed

Sorry. I just noticed that this was a ModelForm, not ModelAdmin. My bad.

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.