Re: [Django] #9602: Add admin.site._registry manipulation methods

11 views
Skip to first unread message

Django

unread,
Sep 28, 2011, 2:32:21 AM9/28/11
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: nobody
Type: New | Status: new
feature | Component: contrib.admin
Milestone: | Severity: Normal
Version: 1.0 | Keywords: register modeladmin
Resolution: | Has patch: 0
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by julien):

* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted


Comment:

Accepting that there should be a cleaner API for interacting with the
registry. However the third point ("provide methods to update common
`ModelAdmin` options") doesn't seem so useful.

--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 26, 2014, 9:52:08 PM4/26/14
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: anonymous
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.0
Severity: Normal | Resolution:
Keywords: register modeladmin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by anonymous):

* status: new => assigned
* needs_tests: 0 => 1
* easy: 0 => 1
* owner: nobody => anonymous
* needs_docs: 0 => 1
* has_patch: 0 => 1


Comment:

useradmin = admin.site._registry.get(User, None)
if useradmin:
useradmin.list_display = useradmin.list_display + ('is_superuser',)
else:
class MyUserAdmin(AuthUserAdmin):
list_display = ('username', 'email', 'first_name', 'last_name',
'is_staff', 'is_superuser')
admin.site.register(User, MyUserAdmin)

--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:4>

Django

unread,
Apr 29, 2014, 7:12:52 PM4/29/14
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: anonymous
Type: New feature | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: register modeladmin | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_docs: 1 => 0
* has_patch: 1 => 0
* version: 1.0 => master
* easy: 1 => 0
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:5>

Django

unread,
Jul 6, 2023, 6:11:05 AM7/6/23
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: Rob Hudson | Owner: Mariusz
| Felisiak

Type: New feature | Status: assigned
Component: contrib.admin | Version: dev

Severity: Normal | Resolution:
Keywords: register modeladmin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: anonymous => Mariusz Felisiak


* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/17049 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:6>

Django

unread,
Jul 7, 2023, 2:06:11 AM7/7/23
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: Rob Hudson | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed

Keywords: register modeladmin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"f64fd47a7627ed6ffe2df2a32ded6ee528a784eb" f64fd47]:
{{{
#!CommitTicketReference repository=""
revision="f64fd47a7627ed6ffe2df2a32ded6ee528a784eb"
Fixed #9602 -- Added AdminSite.get_model_admin().

This allows retrieving an admin class for the given model class without
using internal attributes.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:7>

Django

unread,
Jul 7, 2023, 7:22:16 AM7/7/23
to django-...@googlegroups.com
#9602: Add admin.site._registry manipulation methods
-------------------------------------+-------------------------------------
Reporter: Rob Hudson | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed
Keywords: register modeladmin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"2584783f46922bcb456ceb9700a3726314df65d3" 2584783]:
{{{
#!CommitTicketReference repository=""
revision="2584783f46922bcb456ceb9700a3726314df65d3"
Refs #9602 -- Moved AlreadyRegistered/NotRegistered exceptions to
django.contrib.admin.exceptions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/9602#comment:8>

Reply all
Reply to author
Forward
0 new messages