#11847 closed (invalid)
FormWizard in urlconf is not reversable
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.formtools | Version: | 1.1 |
Severity: | Keywords: | formwizard url reverse | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The recommended way to use a FormWizard is to embed the FormWizard into the urlconf (where it'll be called with call, and operates like a view). However, any template that uses the "url" tag to reverse a view won't work with this.
Fix: don't embed the FormWizard directly into urlconf; wrap it in a view (how? haven't had any luck with this)
Workaround: add another entry to urlconf for the _same_ url, pointing to a view that does nothing. Use this view as the 'url' tag parameter in the template.
I acknowledge this is really ugly.
Change History (2)
comment:1 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Great, thanks for the tip, much better workaround. Does FormWizard need a default behavior, like a standard view?
The recommended way to do that would be to use the named url mappings. See http://docs.djangoproject.com/en/dev/topics/http/urls/#id2 for details