Document django.contrib.admin.sites.all_sites
#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.
Change History
(7)
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
changed from nobody to Edison Wang
|
Status: |
new → assigned
|
Description: |
modified (diff)
|
Has patch: |
set
|
Patch needs improvement: |
set
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Patch needs improvement: |
unset
|
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.