Django

Code

Ticket #5238 (closed: duplicate)

Opened 3 years ago

Last modified 3 years ago

Add ability to intialize form fields with model field default values.

Reported by: Kevin Menard Assigned to: adrian
Milestone: Component: Forms
Version: newforms-admin Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Using the old admin, form fields are populated with the model field default values. With the move to newforms, this ceased to be the case. It would be really nice if the old behavior could be reinstated. In particular, it would be nice if the form field initial values were set to the model field default values.

I've attached a simple patch that provides this behavior.

Attachments

initial-default.diff (0.9 kB) - added by Kevin Menard on 08/23/07 14:21:19.

Change History

08/23/07 14:21:19 changed by Kevin Menard

  • attachment initial-default.diff added.

09/02/07 14:59:34 changed by adrian

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

Duplicate of #4967.


Add/Change #5238 (Add ability to intialize form fields with model field default values.)




Change Properties
Action