[Django] #36659: Re-enable custom height for flatpage content field in admin

17 views
Skip to first unread message

Django

unread,
Oct 11, 2025, 2:02:37 PM10/11/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Type: Bug
Status: new | Component:
| contrib.admin
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
The admin's `forms.css` file contains this rule [1]:

{{{#!css
.flatpages-flatpage #id_content {
height: 40.2em;
}
}}}

The purpose of this rule (I'm guessing) is to make the `FlatPage.content`
field taller on the add/change form, because this field typically contains
a lot of text. This appears to be basically as old as the admin itself,
and was added in dd5320d1d56ca7603747dd68871e72eee99d9e67 (where it
started as `body.core-flatfile #id_content { height: 400px; }`).

However this rule doesn't currently do anything, because the `.flatpages-
flatpage` selector doesn't match anything.

This appears to be a regression that was introduced in release 1.6 with
commit bb145e2c47d71b7f68280c00ced727442d2effa2 wich effectively changed
the body class from `flatpages-flatpage` to `app-flatpages model-
flatpage`.

[1]
https://github.com/django/django/blob/1167cd1d639c3fee69dbdef351d31e8a17d1fedf/django/contrib/admin/static/admin/css/forms.css#L360-L362
--
Ticket URL: <https://code.djangoproject.com/ticket/36659>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 11, 2025, 2:03:06 PM10/11/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-----------------------------------+--------------------------------------
Reporter: Baptiste Mispelon | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Baptiste Mispelon):

* Attachment "ticket-36659.diff" added.

Django

unread,
Oct 11, 2025, 8:39:40 PM10/11/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-----------------------------------+------------------------------------
Reporter: Baptiste Mispelon | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Antoliny):

* stage: Unreviewed => Accepted

Comment:

Thank you Baptiste!
As you mentioned, it seems that the `#id_content` was intended to make the
Content field larger on the FlatPage model Change/Add form.
However, I wasn’t able to find any part of the admin where this CSS is
actually being applied.
And thank you for adding detailed information to the ticket, it really
helped me understand and verify the issue!
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:1>

Django

unread,
Oct 12, 2025, 12:40:47 AM10/12/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-----------------------------------+------------------------------------
Reporter: Baptiste Mispelon | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Antoliny):

* cc: Antoliny (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:2>

Django

unread,
Oct 13, 2025, 11:10:19 PM10/13/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Khanh Vy
| Nguyen
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Khanh Vy Nguyen):

* owner: (none) => Khanh Vy Nguyen
* status: new => assigned

Comment:

I will take this task as my first contribution to the django project.
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:3>

Django

unread,
Oct 14, 2025, 3:23:33 AM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Khanh Vy
| Nguyen
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):

Replying to [comment:3 Khanh Vy Nguyen]:
> I will take this task as my first contribution to the django project.

Hi 👋🏻,
Thank you for your interest, but this ticket already has a patch attached
(see the "Has patch" field).
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:4>

Django

unread,
Oct 14, 2025, 3:29:31 AM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Khanh Vy
| Nguyen
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Antoliny):

Replying to [comment:4 Baptiste Mispelon]:
> Hi 👋🏻,
> Thank you for your interest, but this ticket already has a patch
attached (see the "Has patch" field).

Hello Baptiste, do you happen to know where this PR is? I couldn’t find it
anywhere...
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:5>

Django

unread,
Oct 14, 2025, 3:34:53 AM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Khanh Vy
| Nguyen
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):

Replying to [comment:5 Antoliny]:
> Hello Baptiste, do you happen to know where this PR is? I couldn’t find
it anywhere...

It's not a PR, it's attached as a patch to this ticket (see "Attachments"
at the top)
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:6>

Django

unread,
Oct 14, 2025, 10:03:56 AM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* owner: Khanh Vy Nguyen => Baptiste Mispelon

Comment:

Thanks, a PR would be helpful at this point.
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:7>

Django

unread,
Oct 14, 2025, 11:31:17 AM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):

Replying to [comment:7 Jacob Walls]:
> Thanks, a PR would be helpful at this point.

Sure thing, here you go: https://github.com/django/django/pull/19958
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:8>

Django

unread,
Oct 14, 2025, 1:13:01 PM10/14/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | 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

Comment:

Tangent: seems a bit odd to be doing this with CSS instead in
`flatpages/admin.py` via the `rows` attribute on the `<TextArea>`, but
happy to merge this (well spotted!)
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:9>

Django

unread,
Oct 15, 2025, 11:01:52 AM10/15/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: assigned
Component: contrib.flatpages | Version: 5.2
Severity: Normal | Resolution:
Keywords: | 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):

* component: contrib.admin => contrib.flatpages

--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:10>

Django

unread,
Oct 15, 2025, 11:12:53 AM10/15/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: closed
Component: contrib.flatpages | Version: 5.2
Severity: Normal | Resolution: fixed
Keywords: | 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 <jacobtylerwalls@…>):

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

Comment:

In [changeset:"2b62951fecf0024ce9ce0ce9f5be512c10747c0d" 2b62951f]:
{{{#!CommitTicketReference repository=""
revision="2b62951fecf0024ce9ce0ce9f5be512c10747c0d"
Fixed #36659 -- Fixed flatpage content selector in admin forms.css.

Regression in bb145e2c47d71b7f68280c00ced727442d2effa2.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:11>

Django

unread,
Oct 15, 2025, 11:13:50 AM10/15/25
to django-...@googlegroups.com
#36659: Re-enable custom height for flatpage content field in admin
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: Bug | Status: closed
Component: contrib.flatpages | Version: 5.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"094797ae501167b3ee00fa5f53c9c232b2206329" 094797a]:
{{{#!CommitTicketReference repository=""
revision="094797ae501167b3ee00fa5f53c9c232b2206329"
[6.0.x] Fixed #36659 -- Fixed flatpage content selector in admin
forms.css.

Regression in bb145e2c47d71b7f68280c00ced727442d2effa2.

Backport of 2b62951fecf0024ce9ce0ce9f5be512c10747c0d from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36659#comment:12>
Reply all
Reply to author
Forward
0 new messages