Opened 18 years ago
Closed 17 years ago
#4326 closed (duplicate)
Fixed two bugs in newforms-admin branch
Reported by: | yi.codeplayer at gmail dot com | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
- the code bellow would cause error:
from django.contrib import admin admin.site.register([Model1, Model2], SomeAdminClass)
in contrib/admin/sites.py AdminSite::register , when calling issubclass(model_or_iterable, Model)
, it would complain that model_or_iterable
is not class (because it's instance of list).
- In the index page of new admin , each model is displayed in a seperated app section, there is only one model in each app section (i don't know exactly how to describe it , hope you can understand). this patch make it behavie normal.
Attachments (2)
Change History (8)
by , 18 years ago
Attachment: | django_new_admin_2_bug_fixed.patch added |
---|
by , 18 years ago
Attachment: | django_new_admin_bug_fixed.patch added |
---|
Add two things: 1. Make model registry OrderDict
2. use model.__name__
instead of model.__class__.__name__
when raise exception AlreadyRegistered
because model
is a class.
comment:1 by , 18 years ago
yi.codeplayer: Thanks for the report and patch, but please split these sorts of things across separate tickets in the future. (No need to change this one, as it's already been submitted, but I'm making a suggestion for next time.)
comment:2 by , 17 years ago
Version: | newforms branch → newforms-admin |
---|
comment:3 by , 17 years ago
This patch is slightly out of date -- [5441] fixed the index-page ordering thing in a slightly different way.
comment:4 by , 17 years ago
Keywords: | newadmin removed |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:6 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
The Patch.