SVN: r26049 - trunk/quixote/form
David Binger <dbinger-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Thu, 10 Feb 2005 09:29:18 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dbinger
Date: 2005-02-10 09:29:17 -0500 (Thu, 10 Feb 2005)
New Revision: 26049
Modified:
trunk/quixote/form/form.py
Log:
Change attrs from a keyword parameter to the **parameter in
Form.__init__().
Modified: trunk/quixote/form/form.py
===================================================================
--- trunk/quixote/form/form.py 2005-02-10 14:19:07 UTC (rev 26048)
+++ trunk/quixote/form/form.py 2005-02-10 14:29:17 UTC (rev 26049)
@@ -74,17 +74,14 @@
action_url=None,
enctype=None,
use_tokens=True,
- attrs=None):
+ **attrs):
if method not in ("post", "get"):
raise ValueError("Form method must be 'post' or 'get', "
"not %r" % method)
self.method = method
self.action_url = action_url or self._get_default_action_url()
- if not attrs:
- attrs = {'class': 'quixote'}
- elif 'class' not in attrs:
- attrs = attrs.copy()
+ if 'class' not in attrs:
attrs['class'] = 'quixote'
self.attrs = attrs
self.widgets = []