Define a default help_text for ColorField #9890

Closed
opened 2025-12-29 21:24:02 +01:00 by adam · 1 comment
Owner

Originally created by @jeremystretch on GitHub (Jun 24, 2024).

Originally assigned to: @Julio-Oliveira-Encora on GitHub.

Proposed Changes

Set a default help_text value on the ColorField model/form field.

Justification

There are many places where we currently define a help text for these fields as

mark_safe(_('RGB color in hexadecimal. Example:') + ' <code>00ff00</code>')

Creating a a reusable form field for these will eliminate this redundant code.

Originally created by @jeremystretch on GitHub (Jun 24, 2024). Originally assigned to: @Julio-Oliveira-Encora on GitHub. ### Proposed Changes Set a default `help_text` value on the ColorField model/form field. ### Justification There are many places where we currently define a help text for these fields as ``` mark_safe(_('RGB color in hexadecimal. Example:') + ' <code>00ff00</code>') ``` Creating a a reusable form field for these will eliminate this redundant code.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 21:24:02 +01:00
adam closed this issue 2025-12-29 21:24:02 +01:00
Author
Owner

@Julio-Oliveira-Encora commented on GitHub (Jun 24, 2024):

Could you please assign it to me?

@Julio-Oliveira-Encora commented on GitHub (Jun 24, 2024): Could you please assign it to me?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9890