Opened 10 years ago

Closed 10 years ago

#4018 closed (fixed)

Allow callable values as initial for newforms-fields

Reported by: David Danier <goliath.mailinglist@…> Owned by: Adrian Holovaty
Component: Forms Version: master
Severity: Keywords: lazydate newforms initial callable
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Like in the model-fields this can be used to replace LazyDate, see http://groups.google.com/group/django-developers/msg/00bf8f4bf4bbc81c.

Attachments (2)

django-make-initial-newforms-value-callable.diff (987 bytes) - added by David Danier <goliath.mailinglist@…> 10 years ago.
django-make-initial-newforms-value-callable.2.diff (4.7 KB) - added by David Danier <goliath.mailinglist@…> 10 years ago.
Patch including tests

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by David Danier <goliath.mailinglist@…>

comment:1 Changed 10 years ago by Chris Beaven

Triage Stage: UnreviewedReady for checkin

Thanks David. Probably only other suggestion is that it could do with a test or two, but it's a simple enough patch that I won't let that hold up the process.

comment:2 Changed 10 years ago by Malcolm Tredinnick

Needs tests: set
Triage Stage: Ready for checkinAccepted

Yep, needs tests before it can go. The easy patches are the easiest ones to write tests for. There is no excuse.

Changed 10 years ago by David Danier <goliath.mailinglist@…>

Patch including tests

comment:3 in reply to:  2 Changed 10 years ago by David Danier <goliath.mailinglist@…>

Needs tests: unset

Replying to mtredinnick:

Yep, needs tests before it can go. The easy patches are the easiest ones to write tests for. There is no excuse.

So the new patch includes some tests ;-)

comment:4 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [5209]) Fixed #4018 -- Added code to allow callables as initial data in newforms. Thanks for the patch, David Danier.

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