Opened 13 years ago
Closed 13 years ago
#17162 closed New feature (fixed)
Remove WizardView.get_wizard_name()
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.formtools | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I propose removing WizardView.get_wizard_name
. I think this is a good idea
because currently it seems like get_wizard_name
is essentially just the current implementation of
get_prefix. get_wizard_name
isn't used anywhere else, and adds the burden of
being an API that would need to be maintained. Essentially this would just mean moving
the contents of get_wizard_name
into get_prefix
.
I also propose changing WizardView.get_prefix
to accept request, *args, **kwargs
. This would allow for greater flexibility in how the prefix is
determined.
My current use-case is that I want to be able to have multiple incomplete wizards
in progress at the same time. I then want to have the wizard prefix in the URL,
so that a user is able to navigate to the different incomplete instances of the wizard
that they're currently completing. I've achieved this for my situation by reimplementing WizardView.dispatch
and WizardView.get_prefix
, but my above suggestion would simplify this.
Attachments (3)
Change History (10)
by , 13 years ago
Attachment: | 17162.diff added |
---|
by , 13 years ago
Attachment: | 17162-2.diff added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Has patch: | set |
---|
comment:4 by , 13 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
Indeed, it doesn't seem useful to have get_wizard_name
in the public API. Since this is a new feature, we can still adjust the API without running into backward compatibility issues.
I'll let the original author make the decision.
comment:5 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Design decision needed → Accepted |
Technically I agree, this is an unneeded duplication, but get_prefix
shouldn't take a request parameter since it's already available on wizard view level as self.request
.
comment:6 by , 13 years ago
.. just added a new patch and removed the get_wizard_name method. I think this is ready for checkin.
Forgot to remove docs for
get_wizard_name()
, fixed in17162-2.diff
.