Author: nascheme Date: 2004-03-18 12:09:46 -0500 (Thu, 18 Mar 2004) New Revision: 23733 Modified: trunk/quixote/form2/form.py trunk/quixote/form2/widget.py Log: Add Form.has_key method. Don't sort select widget options by default. Modified: trunk/quixote/form2/form.py =================================================================== --- trunk/quixote/form2/form.py 2004-03-18 16:05:50 UTC (rev 23732) +++ trunk/quixote/form2/form.py 2004-03-18 17:09:46 UTC (rev 23733) @@ -102,6 +102,10 @@ except KeyError: raise KeyError, 'no widget named %r' % name + def has_key(self, name): + """Return true if the widget named 'name' is in the form.""" + return self._names.has_key(name) + def get(self, name): widget = self._names.get(name) if widget is not None: Modified: trunk/quixote/form2/widget.py =================================================================== --- trunk/quixote/form2/widget.py 2004-03-18 16:05:50 UTC (rev 23732) +++ trunk/quixote/form2/widget.py 2004-03-18 17:09:46 UTC (rev 23733) @@ -257,7 +257,7 @@ The value is None or an element of dict(options.values()). """ - def __init__(self, name, value=None, options=None, sort=True, + def __init__(self, name, value=None, options=None, sort=False, verify_selection=True, **kwargs): assert self.__class__ is not SelectWidget, "abstract class" Widget.__init__(self, name, value, **kwargs)