Opened 7 years ago

Closed 7 years ago

#4696 closed (fixed)

[newforms-admin] site.register reports a wrong error message

Reported by: Honza Král <Honza.Kral@…> Owned by: adrian
Component: contrib.admin Version: newforms-admin
Severity: Keywords: register AlreadyRegistered
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


whe you do site.register on a model that has already been registered with the site, you get

AlreadyRegistered: The model ModelBase is already registered

It is always ModelBase since the code says (

raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__)

insted of

raise AlreadyRegistered('The model %s is already registered' % model.__name__)

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by adrian

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

(In [5595]) newforms-admin: Fixed #4696 -- Fixed incorrect error message for AdminSite.register() and AdminSite.unregister(). Thanks, Honza Kral

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.