[Django] #22372: Incorrect docstring in wizard views

5 views
Skip to first unread message

Django

unread,
Apr 1, 2014, 8:04:13 PM4/1/14
to django-...@googlegroups.com
#22372: Incorrect docstring in wizard views
--------------------------------------+--------------------
Reporter: simon29 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+--------------------
In formtools.wizard.views.get_context_data, the docstring states the
"wizard instance itself" is available in the template, but this is not
correct.

The context includes a variable "wizard", but it is not the instance (as
you would expect). This is confusing and dumb. Either the code should be
changed (preferred, unless there is some paranoid security concern I'm not
considering); or the docstring fixed and docs updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/22372>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 1, 2014, 10:58:12 PM4/1/14
to django-...@googlegroups.com
#22372: Incorrect docstring in wizard views
--------------------------------------+------------------------------------

Reporter: simon29 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Alex):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/22372#comment:1>

Django

unread,
Apr 2, 2014, 2:23:05 AM4/2/14
to django-...@googlegroups.com
#22372: Incorrect docstring in wizard views
--------------------------------------+------------------------------------
Reporter: simon29 | Owner: vlal
Type: Cleanup/optimization | Status: assigned
Component: Forms | Version: 1.6

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by vlal):

* cc: vlal (added)
* owner: nobody => vlal
* has_patch: 0 => 1
* status: new => assigned


Comment:

Also it seems the form instance is actually included as part of the wizard
key.
{{{
context['wizard'] = {
'form': form,
'steps': self.steps,
'management_form': ManagementForm(prefix=self.prefix,
initial={
'current_step': self.steps.current,
}),
}
}}}

It would be easier to modify the docstring and docs to reflect this rather
than modify the code and potentially break many things.

Issued [https://github.com/django/django/pull/2505 Pull Request #2505].
Verified documentation builds correctly.

--
Ticket URL: <https://code.djangoproject.com/ticket/22372#comment:2>

Django

unread,
Apr 3, 2014, 8:28:04 AM4/3/14
to django-...@googlegroups.com
#22372: Incorrect docstring in wizard views
--------------------------------------+------------------------------------
Reporter: simon29 | Owner: vlal
Type: Cleanup/optimization | Status: closed
Component: Forms | Version: 1.6
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"a8e2ec0e82aaebfa53a8074581b22849896537df"]:
{{{
#!CommitTicketReference repository=""
revision="a8e2ec0e82aaebfa53a8074581b22849896537df"
Fixed #22372 -- Improved description of WizardView.get_context_data().

Thanks simon29 for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22372#comment:3>

Django

unread,
Apr 3, 2014, 8:28:21 AM4/3/14
to django-...@googlegroups.com
#22372: Incorrect docstring in wizard views
--------------------------------------+------------------------------------
Reporter: simon29 | Owner: vlal
Type: Cleanup/optimization | Status: closed
Component: Forms | Version: 1.6

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"1cce00a7620f1882b3b1999e799eb1d3cc65c1ca"]:
{{{
#!CommitTicketReference repository=""
revision="1cce00a7620f1882b3b1999e799eb1d3cc65c1ca"
[1.6.x] Fixed #22372 -- Improved description of
WizardView.get_context_data().

Thanks simon29 for the report.

Backport of a8e2ec0e82 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22372#comment:5>

Reply all
Reply to author
Forward
0 new messages