[Django] #37085: Move object-based stylesheet media assets to the public API

3 views
Skip to first unread message

Django

unread,
May 5, 2026, 8:51:16 PM (4 days ago) May 5
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia | Owner: Natalia Bidart
Bidart |
Type: New | Status: assigned
feature |
Component: Forms | Version: dev
Severity: Normal | Keywords: Media MediaAsset
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
This ticket is a successor to #35886 and aims to move object-based
stylesheet assets to the public API and documentation.

A `CSS` sample implementation has been part of the test suite for a while,
see
[https://github.com/django/django/blob/989329344aabe8ef7a5e55bebfde53f0e00f42e2/tests/forms_tests/tests/test_media.py#L8-L13
source code].

The goal is to provide parity with the `Script` class added in
989329344aabe8ef7a5e55bebfde53f0e00f42e2 and facilitate the work for
adding support for nonces in forms.Media (#36784).

See also: ​https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link
--
Ticket URL: <https://code.djangoproject.com/ticket/37085>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 6, 2026, 7:35:08 AM (3 days ago) May 6
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37085#comment:1>

Django

unread,
May 6, 2026, 9:17:04 PM (3 days ago) May 6
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/21239 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/37085#comment:2>

Django

unread,
May 7, 2026, 5:24:40 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37085#comment:3>

Django

unread,
May 7, 2026, 6:07:31 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* has_patch: 1 => 0
* needs_tests: 1 => 0

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

Django

unread,
May 7, 2026, 6:07:57 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* has_patch: 0 => 1

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

Django

unread,
May 7, 2026, 9:39:38 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 1 => 0

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

Django

unread,
May 7, 2026, 9:41:30 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

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

Django

unread,
May 7, 2026, 10:49:23 AM (2 days ago) May 7
to django-...@googlegroups.com
#37085: Move object-based stylesheet media assets to the public API
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: New feature | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: Media MediaAsset | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):

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

Comment:

In [changeset:"8096b5251090bf7539c59956e398b027c7525529" 8096b52]:
{{{#!CommitTicketReference repository=""
revision="8096b5251090bf7539c59956e398b027c7525529"
Fixed #37085 -- Added support for object-based form media stylesheet
assets.

Thank you James Walls and James Bligh for reviews.

Co-authored-by: Johannes Maron <joha...@maron.family>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37085#comment:8>
Reply all
Reply to author
Forward
0 new messages