Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ZPublisher request parameter controls #636

Closed
d-maurer opened this issue May 20, 2019 · 3 comments
Closed

Document ZPublisher request parameter controls #636

d-maurer opened this issue May 20, 2019 · 3 comments

Comments

@d-maurer
Copy link
Contributor

ZPublisher (more precisely ZPublisher.HTTPRequest,processInputs) supports a large set of controls which guide the interpretation of request parameters. A request parameter (as supported by Zope) has the general form name=value. Controls are specified as suffixes of the form :<control> to the name part of the request parameter. They can specify for example a type for the value or how the parameter should be aggregated with other request parameters to form a complex form variable. Examples are x:int=1 (gives a form variable x with integer value 1) and r.x:record=1 (gives a form variable r with attribute x with value '1').

The discussions in #618 and #634 have shown that we need a specification/documentation of these features.

Where should such a documentation/specification be located?

  • my personal preference would be a file request_parameter_controls.rst alongside HTTPRequest with a reference in the docstring of its processInputs to this file

with alternatives:

  • directly put it in the docstring of processInputs
  • put it in the "Zope Developer Guide"
  • put it in the "Zope Book"

Such a document would have wide ranging effects:

@icemac
Copy link
Member

icemac commented May 21, 2019

I like the idea to have the documentation near the code although it should be in the documentation, too to be easily findable.

@d-maurer
Copy link
Contributor Author

d-maurer commented May 21, 2019 via email

d-maurer added a commit that referenced this issue Jun 7, 2019
* document request paramter handling #636

* document request paramter handling #636

* apply the improvements proposed by @jirmac00

* - wording and grammar changes

* - merging the documentation into the ZDG

* - point to the Zope Developer's Guide

* - updates following Dieter's suggestions

* remove `src/ZPublisher/request_params.rst` as its content is now integrated in `docs/zdgbook/ObjectPublishing.rst`

* bring request lookup order documentation in line with reality

* remove items from the "converter" list which are now classified as "aggregator"
use the same formatting type for "aggregator"s as for "converter"s

* Follow suggestion from icemac

Co-Authored-By: Michael Howitz <mh@gocept.com>

* Follow suggestion from icemac

Co-Authored-By: Michael Howitz <mh@gocept.com>

* Follow suggestion from icemac

Co-Authored-By: Michael Howitz <mh@gocept.com>
@d-maurer
Copy link
Contributor Author

Closed via #640

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

No branches or pull requests

2 participants