On Thu, Dec 6, 2012 at 4:21 PM, Mike Orr <[email protected]> wrote:
> (5) submitting each screen does standard form validation (I think it's all
> Javascript rather than FormEncode?) and loads its fields into the session.
> But it also calls C functions, and the data may be rejected due to some
> obscure detail in the C model that can't be caught by ordinary Javascript or
> Python validation. E.g., you say the chemical is a liquid with such a
> volume, but that chemical can't be a liquid at the weather's temperature.
> The C function spits back one or more "stop messages" (errors) and/or "show
> messages" warnings, which go into the session and then it redirects back to
> the form page. The form page redisplays the form, but the stop and show
> messages are extracted from the session to the template and appear in a
> Javascript "lightbox" (a kind of modal dialog, with the dimmed form fields
> showing around it).
> (6) If there were no errors, it continues to a result page which calls some
> more C functions and displays a bunch of results.
So I think what I want is for the redisplay result to have a
non-Javascript way of indicating that it's displaying a message. I
could do that by adding "X-Stop-Message" headers to the response. Or
in Pylons there was this thing called ``request.environ[
"paste.testing_variables"] = {}``, which would be set only in testing
mode and where the controller could put extra data for the test. Does
Pyramid have anything equivalent to that?
--
Mike Orr <[email protected]>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.