Opened 6 years ago

Closed 2 years ago

Last modified 2 years ago

#28009 closed Cleanup/optimization (fixed)

Document and test Field.empty_value for CharField subclasses

Reported by: Matt Braymer-Hayes Owned by: David Smith
Component: Documentation Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi folks, question: Do the changes made in #4136 also impact models.CharField subclasses (CommaSeparatedIntegerField, EmailField, SlugField, and URLField) and forms.CharField subclasses (RegexField, EmailField, URLField, GenericIPAddressField, SlugField, and UUIDField)? Based on my review of the code they do, though I may be missing something. If they are, the docstrings and documentation for each of the forms.CharField subclasses should be updated. Additionally, the release notes should mention the other fields impacted. I'm happy to make a PR, if this is the case.

Change History (10)

comment:1 Changed 6 years ago by Tim Graham

Summary: Changes to models.CharField and forms.CharField impact subclasses as wellDocument and test Field.empty_value for CharField subclasses
Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Daniel Greenfeld

Looking at the source code (https://github.com/django/django/blob/master/django/db/models/fields/__init__.py#L2237) shows that the new CharField behavior is the same for other fields inheriting from it.

comment:3 Changed 6 years ago by Matt Braymer-Hayes

Owner: Matt Braymer-Hayes deleted
Status: assignednew

comment:5 Changed 3 years ago by David Smith

Has patch: set
Owner: set to David Smith
Last edited 3 years ago by Mariusz Felisiak (previous) (diff)

comment:6 Changed 3 years ago by David Smith

Patch needs improvement: set

comment:7 Changed 2 years ago by David Smith

Patch needs improvement: unset

comment:8 Changed 2 years ago by Mariusz Felisiak

Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:9 Changed 2 years ago by Mariusz Felisiak <felisiak.mariusz@…>

In b8239ca:

Refs #28009 -- Added empty_value tests for CharField subclasses.

comment:10 Changed 2 years ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 91669cc5:

Fixed #28009 -- Doc'd empty_value for CharField subclasses.

comment:11 Changed 2 years ago by Mariusz Felisiak <felisiak.mariusz@…>

In 793bd24d:

[3.1.x] Fixed #28009 -- Doc'd empty_value for CharField subclasses.

Backport of 91669cc566918fde4fe98f867cf4c406f64504e6 from master

Note: See TracTickets for help on using tickets.
Back to Top