Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 2638:18e86941c950
Load up extensions in the tracker "extensions" directory.
Wrote a proof-of-concept action, is in the wiki.
Cleaned up the schema.py file of spaces-at-eol.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 27 Jul 2004 02:30:32 +0000 |
| parents | 5a8d9465827e |
| children | 1df7d4a41da4 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Tue Jul 27 01:59:28 2004 +0000 +++ b/roundup/cgi/client.py Tue Jul 27 02:30:32 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.184 2004-07-20 02:07:58 richard Exp $ +# $Id: client.py,v 1.185 2004-07-27 02:30:31 richard Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -654,13 +654,19 @@ action = self.form['@action'].value.lower() else: return None + try: - # get the action, validate it - for name, action_klass in self.actions: - if name == action: - break + if (hasattr(self.instance, 'cgi_actions') and + self.instance.cgi_actions.has_key(action)): + # tracker-defined action + action_klass = self.instance.cgi_actions[action] else: - raise ValueError, 'No such action "%s"'%action + # go with a default + for name, action_klass in self.actions: + if name == action: + break + else: + raise ValueError, 'No such action "%s"'%action # call the mapped action if isinstance(action_klass, type('')):
