# HG changeset patch # User paulb # Date 1094506562 0 # Node ID 879f981d30e0799057eafaf6a933ac5e146b6217 # Parent 455602cb8c98aea138b20623d680c3af3aae4bc0 [project @ 2004-09-06 21:35:53 by paulb] Added get_fields tests (which expose things like repeated access to file upload values). Fixed empty value printing. diff -r 455602cb8c98 -r 879f981d30e0 examples/Common/Form/__init__.py --- a/examples/Common/Form/__init__.py Mon Sep 06 21:35:14 2004 +0000 +++ b/examples/Common/Form/__init__.py Mon Sep 06 21:36:02 2004 +0000 @@ -46,8 +46,10 @@ if charset: fields = trans.get_fields_from_body(charset) + all_fields = trans.get_fields(charset) else: fields = trans.get_fields_from_body() + all_fields = trans.get_fields() out = trans.get_response_stream() @@ -85,13 +87,16 @@

%s

Fields from Body

+

Fields from Body and Path

+ """ % ( content_type_str, content_type_charset, charset, - self._format_fields(fields) + self._format_fields(fields), + self._format_fields(all_fields), )) def _format_fields(self, d): @@ -102,7 +107,7 @@ def _format_list(self, l): return "".join([ - "
  • %s
  • " % value + "
  • %s
  • " % (value or "empty") for value in l ]) diff -r 455602cb8c98 -r 879f981d30e0 examples/Common/Simple/__init__.py --- a/examples/Common/Simple/__init__.py Mon Sep 06 21:35:14 2004 +0000 +++ b/examples/Common/Simple/__init__.py Mon Sep 06 21:36:02 2004 +0000 @@ -63,6 +63,11 @@ %s +
  • Fields from path and body: + +
  • Cookies: