Opened 18 years ago
Closed 10 years ago
#4363 closed New feature (fixed)
Formpreview doesn't support newform's dynamic initial values
Reported by: | Indy | Owned by: | nobody |
---|---|---|---|
Component: | contrib.formtools | Version: | dev |
Severity: | Normal | Keywords: | preview |
Cc: | sciyoshi@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The formpreview has no hook for dynamic initial field values. The attached patch provides this hook.
Attachments (1)
Change History (9)
by , 18 years ago
Attachment: | preview.diff added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 17 years ago
Cc: | added |
---|
comment:4 by , 14 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Design decision needed → Accepted |
Patch is out of date, but the approach seems fine. Needs tests as well.
comment:5 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
formtools has been extracted into its own repository (https://github.com/django/django-formtools/). Because of this, the issue tracking for this package has been moved to GitHub issues. I'm going to close this ticket, but I've created a GitHub issue to replace it where the conversation can continue: https://github.com/django/django-formtools/issues/24. Thanks!
Why not make this a bit more generic? If you look at #3218 (shameless promotion), it has this fixed - it can cope with initial data (via
self.initial
), custom rendering mechanisms etc.Wouldn't it make more sense to build a common super class for
FormPreview
andWizard
? There is some shared code in already and since both classes are used in a very similar manner, it would make sense to refactor the common parts out. I will be happy to do the work.