Opened 14 years ago

Closed 14 years ago

#13395 closed (worksforme)

admin | Incomplete behavior of unregister() | unregistering foo.Bar and registering refoo.Bar with app_label results in original foo.Bar

Reported by: Yeago Owned by: nobody
Component: Contrib apps Version: 1.2-beta
Severity: Keywords: admin unregister
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

I have app 'agency' which has model Settings and with an admin which registers it. This serves as a default.

I attempted to override these settings in the admin of another project's 'agency_local' app. Steps I took:

  • unregister agency.Settings in agency_local.admin
  • register agency_local.Settings # works ok, but in admin it shows up under Agency_local list
  • added "agency" as 'app_label' to agency_local.Settings # results in the original unregistered settings showing up again!

Change History (2)

comment:1 by Alex Gaynor, 14 years ago

Description: modified (diff)

Please use preview ;)

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: worksforme
Status: newclosed

I can't reproduce this - using unregister in the 'local' admin.py to remove the old registration, then another register call to installed the new admin settings worked exactly as I would have expected. I didn't see any evidence of models appearing under the wrong application.

Closing worksforme. If you're certain you've found a problem, please provide a complete test case that demonstrates the problem.

Note: See TracTickets for help on using tickets.
Back to Top