Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19024 closed Cleanup/optimization (fixed)

FormWizard WizardView.get_form_prefix form argument is unused

Reported by: kenth Owned by: steph
Component: contrib.formtools Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation shows WizardView.get_for_prefix(step). Actual definition is
def get_form_prefix(self, step=None, form=None): In practice, the form argument is passed.

Attachments (1)

19024.diff (1.2 KB) - added by timo 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 2 years ago by claudep

  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 2 years ago by timo

comment:2 Changed 2 years ago by timo

  • Component changed from Documentation to contrib.formtools
  • Has patch set
  • Summary changed from FormWizard WizardView.get_form_prefix signature incorrect to FormWizard WizardView.get_form_prefix form argument is unused
  • Triage Stage changed from Accepted to Ready for checkin
  • Type changed from Bug to Cleanup/optimization

Actually, this argument isn't used so I'd suggest we remove it.

comment:3 Changed 2 years ago by claudep

To be completely sure, you could try to ping Stephan Jaekel, which might be the original author of this code (https://github.com/stephrdev/django-formwizard/commit/1301efd06383df727e455d08eee3ef3dc1f98d27).

comment:4 Changed 2 years ago by steph

I think removing the argument isn't a good idea. The get_form_prefix method is public api and some developers may use the form argument to determine the form prefix. Therefore, I updated the docs for the get_form_prefix method. (Please see https://github.com/stephrdev/django/commit/aa5b0a3ae8ff7abef3c64787dc09ff1ce17993c1)

comment:5 Changed 2 years ago by steph

  • Owner changed from nobody to steph
  • Status changed from new to assigned

comment:6 Changed 2 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 17f8496fea9b866769b2d2a04326acbe25e9256f:

Fixed #19024 -- Corrected form wizard docs for get_form_prefix.

comment:7 Changed 2 years ago by Claude Paroz <claude@…>

In f16eb0b0d049595f837005986b1db539528fef2f:

[1.5.x] Fixed #19024 -- Corrected form wizard docs for get_form_prefix.

Backport of 17f8496fe from master.

comment:8 Changed 2 years ago by Tim Graham <timograham@…>

In c9b577ead6ca9a96e2066fd739b7c340dae5ca3a:

Clarified WizardView.get_form_prefix doc, refs #19024

comment:9 Changed 2 years ago by Tim Graham <timograham@…>

In b7828705c8a87a079b6226caf959c821bd51fa91:

[1.5.x] Clarified WizardView.get_form_prefix doc, refs #19024

Backport of c9b577ead6 from master

comment:10 Changed 2 years ago by Claude Paroz <claude@…>

In f16eb0b0d049595f837005986b1db539528fef2f:

[1.5.x] Fixed #19024 -- Corrected form wizard docs for get_form_prefix.

Backport of 17f8496fe from master.

comment:11 Changed 2 years ago by Tim Graham <timograham@…>

In b7828705c8a87a079b6226caf959c821bd51fa91:

[1.5.x] Clarified WizardView.get_form_prefix doc, refs #19024

Backport of c9b577ead6 from master

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