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

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

@timgraham timgraham and 1 other commented on an outdated diff Jan 12, 2013

docs/ref/contrib/formtools/form-wizard.txt
- Given the step, returns a form prefix to use. By default, this simply uses
- the step itself. For more, see the :ref:`form prefix documentation
- <form-prefix>`.
+ Given the step and the form class which will be called with the returned
@timgraham

timgraham Jan 12, 2013

Owner

I see this has actually been merged, but this first sentence doesn't make sense.

@stephrdev

stephrdev Jan 13, 2013

Contributor

I'm not a native speaker, but what doesn't make sense in this sentence? What I wanted to say is that the method is called with two arguments. The step and the form class for the current step. The passed form class is the form which will be called with the prefix this method returns. How could we express this in the documentation?

@timgraham

timgraham Jan 13, 2013

Owner

Thanks for clarifying. How about "Given the step and the form for the step, returns a form prefix to use." Does that lose any of the meaning you were trying to add?

@stephrdev

stephrdev Jan 13, 2013

Contributor

I think its important to state that the form class is given, not a form instance because the form class will be instantiated using the returned form prefix.

Owner

timgraham commented Jan 13, 2013

Got it, how about this (slightly reworded from the docstring):

Returns the prefix which will be used when calling the form for the given
step. ``step`` contains the step name, ``form`` the form class which will
be called with the returned prefix.

If no ``step`` is given, it will be determined automatically. By
default, this simply uses the step itself and the ``form`` parameter
is not used.
Contributor

stephrdev commented Jan 15, 2013

Thank you! I just updated the pull request. I think the new text is better.

timgraham closed this Jan 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment