Opened 12 years ago

Last modified 12 years ago

#17162 closed New feature

Remove WizardView.get_wizard_name() — at Version 3

Reported by: Bradley Ayers <bradley.ayers@…> 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 Aymeric Augustin)

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.

Change History (5)

by Bradley Ayers <bradley.ayers@…>, 12 years ago

Attachment: 17162.diff added

by Bradley Ayers <bradley.ayers@…>, 12 years ago

Attachment: 17162-2.diff added

comment:1 by Bradley Ayers <bradley.ayers@…>, 12 years ago

Forgot to remove docs for get_wizard_name(), fixed in 17162-2.diff.

comment:2 by Bradley Ayers <bradley.ayers@…>, 12 years ago

Has patch: set

comment:3 by Aymeric Augustin, 12 years ago

Description: modified (diff)

Fixed formatting.

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