This set is also useful for custom checks and tests across all admin
sites. For example, the parameterized test I just blogged about:
https://adamj.eu/tech/2023/03/17/django-parameterized-tests-model-admin-
classes/ .
`all_sites` has been stable since 2017. I suggest that we document it, so
that it’s a public API that such custom checks and tests can rely on.
--
Ticket URL: <https://code.djangoproject.com/ticket/34419>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:1>
* owner: nobody => Edison Wang
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:2>
* has_patch: 0 => 1
Old description:
> #27673 added `all_sites` in django.contrib.admin.sites` as a weak set of
> all sites instnaces. It's used by system checks to loop over all current
> site instances.
>
> This set is also useful for custom checks and tests across all admin
> sites. For example, the parameterized test I just blogged about:
> https://adamj.eu/tech/2023/03/17/django-parameterized-tests-model-admin-
> classes/ .
>
> `all_sites` has been stable since 2017. I suggest that we document it, so
> that it’s a public API that such custom checks and tests can rely on.
New description:
#27673 added `all_sites` in django.contrib.admin.sites` as a weak set of
all sites instances. It's used by system checks to loop over all current
site instances.
This set is also useful for custom checks and tests across all admin
sites. For example, the parameterized test I just blogged about:
https://adamj.eu/tech/2023/03/17/django-parameterized-tests-model-admin-
classes/ .
`all_sites` has been stable since 2017. I suggest that we document it, so
that it’s a public API that such custom checks and tests can rely on.
--
Comment:
https://github.com/django/django/pull/16712
I fixed a typo in the ticket. Also, I'm unsure about the formatting for
the documentation, but the content should be good. Please check so I can
revise if needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"255f5345904854128647705adcb8d21138e87c63" 255f5345]:
{{{
#!CommitTicketReference repository=""
revision="255f5345904854128647705adcb8d21138e87c63"
Fixed #34419 -- Doc'd django.contrib.admin.sites.all_sites.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:5>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"509401313471ac0e9ef2e0c575c02db4436d6158" 5094013]:
{{{
#!CommitTicketReference repository=""
revision="509401313471ac0e9ef2e0c575c02db4436d6158"
[4.2.x] Fixed #34419 -- Doc'd django.contrib.admin.sites.all_sites.
Backport of 255f5345904854128647705adcb8d21138e87c63 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:6>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/34419#comment:7>