Opened 8 years ago

Closed 4 years ago

Last modified 4 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 by Tim Graham, 8 years ago

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 by Daniel Greenfeld, 8 years ago

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 by Matt Braymer-Hayes, 7 years ago

Owner: Matt Braymer-Hayes removed
Status: assignednew

comment:5 by David Smith, 4 years ago

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

comment:6 by David Smith, 4 years ago

Patch needs improvement: set

comment:7 by David Smith, 4 years ago

Patch needs improvement: unset

comment:8 by Mariusz Felisiak, 4 years ago

Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In b8239ca:

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

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 91669cc5:

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

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

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