Date/Time fields' clean methods need strip()
Reported by: |
Simon Litchfield <simon@…> |
Owned by: |
nobody |
Component:
|
Forms
|
Version:
|
dev
|
Severity:
|
Normal
|
Keywords:
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
Minor, but trailing/leading spaces throw date/time fields.
Believe it or not this has come up on two separate occasions now, so I thought I'd submit the patch.
Change History
(11)
Triage Stage: |
Unreviewed → Design decision needed
|
Resolution: |
→ duplicate
|
Status: |
new → closed
|
Triage Stage: |
Design decision needed → Accepted
|
Resolution: |
duplicate
|
Status: |
closed → reopened
|
Severity: |
→ Normal
|
Type: |
→ Cleanup/optimization
|
Resolution: |
→ fixed
|
Status: |
reopened → closed
|
I'll push to a design decision, in the past these issues have been brushed off with a "create your own subclass" but I like the idea.
In fact, I'd be tempted to put a
clean_strip
attribute on Field (defaulting toFalse
for most, overridden toTrue
default for date/time fields) since this is a common request. But that's just me dreaming :)