[Moin-user] suitable for driving backend applications?
Chris Kacoroski
ckacoroski at nsd.org
Fri Jul 9 08:53:33 EDT 2004
Brian,
Does this require python 2.3. I get the initial form when putting in
the code below, but after entering in a ticket I get the following under
the open section:
/var/moin/TechWiki/data/plugin/macro/Ticket.py in
execute(*args=(<MoinMoin.wikimacro.Macro instance>, 'open'))
321 if not len(args) == 2: return 'Not an action or macro'
322 if type(args[0]) == type(''): retval = do_actions(*args)
323 else: retval = do_macros(*args)
324 return retval
325
retval undefined, global do_macros = <function do_macros>, args =
(<MoinMoin.wikimacro.Macro instance>, 'open')
/var/moin/TechWiki/data/plugin/macro/Ticket.py in
do_macros(i_macro=<MoinMoin.wikimacro.Macro instance>, args='open')
300 request = i_macro.parser.request
301 if args in macros:
302 return macros[args](i_macro)
303 args = dict_from_request(args) # Perhaps this function
should be renamed
304 path = request.getPathinfo()
global macros = {'closed': <function show_closed_tickets>, 'form':
<function show_create_form>, 'open': <function show_open_tickets>,
'status': <function show_status>, 'update': <function
show_update_form>}, args = 'open', i_macro = <MoinMoin.wikimacro.Macro
instance>
/var/moin/TechWiki/data/plugin/macro/Ticket.py in
show_open_tickets(i=<MoinMoin.wikimacro.Macro instance>)
110
111 def show_open_tickets(i):
112 return show_tickets(i, True)
113 def show_closed_tickets(i):
114 return show_tickets(i, False)
global show_tickets = <function show_tickets>, i =
<MoinMoin.wikimacro.Macro instance>, True undefined
/var/moin/TechWiki/data/plugin/macro/Ticket.py in
show_tickets(i_macro=<MoinMoin.wikimacro.Macro instance>, opened=1)
135 if not topen: continue
136 s['ticket'] = ticket
137 result.append(FORMAT % s)
138 p = wiki.Parser('\n'.join(result), i_macro.request)
139 p.format(i_macro.formatter)
result = [], result.append = <built-in method append of list object>,
FORMAT = ' * ["%(ticket)s"] : %(synopsis)s', s = {'ticket':
'/2004Jul09-09:05'}
KeyError: synopsis
__doc__ = 'Mapping key not found.'
__getitem__ = <bound method KeyError.__getitem__ of
<exceptions.KeyError instance>>
__init__ = <bound method KeyError.__init__ of
<exceptions.KeyError instance>>
__module__ = 'exceptions'
__str__ = <bound method KeyError.__str__ of <exceptions.KeyError
instance>>
args = ('synopsis',)
And when I try to run the Ticket action I get:
/var/moin/TechWiki/data/plugin/action/Ticket.py in
execute(*args=('TestPage', <MoinMoin.request.RequestCGI instance>))
320 '''
321 if not len(args) == 2: return 'Not an action or macro'
322 if type(args[0]) == type(''): retval = do_actions(*args)
323 else: retval = do_macros(*args)
324 return retval
type undefined, args = ('TestPage', <MoinMoin.request.RequestCGI
instance>), retval undefined, global do_actions = <function do_actions>
/var/moin/TechWiki/data/plugin/action/Ticket.py in
do_actions(pagename='TestPage', request=<MoinMoin.request.RequestCGI
instance>)
276 '''
277
278 actions[request.form.get('ACTION', dummy)[0]](pagename, request)
279 return
280
global actions = {'create': <function create_new_ticket>, 'update':
<function update_ticket>}, request = <MoinMoin.request.RequestCGI
instance>, request.form = {'action': ['Ticket']}, request.form.get =
<built-in method get of dict object>, global dummy = <function dummy>,
pagename = 'TestPage'
TypeError: unsubscriptable object
__doc__ = 'Inappropriate argument type.'
__getitem__ = <bound method TypeError.__getitem__ of
<exceptions.TypeError instance>>
__init__ = <bound method TypeError.__init__ of
<exceptions.TypeError instance>>
__module__ = 'exceptions'
__str__ = <bound method TypeError.__str__ of
<exceptions.TypeError instance>>
args = ('unsubscriptable object',)
TypeErrorunsubscriptable object Please include this information in your
bug reports!:
Python Python 2.2.3: /usr/bin/python
Linux sccs.nsd.org 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:18:24 EDT 2004 i686
MoinMoin Release 1.2.1 [Revision 1.184]
Fri Jul 9 09:08:46 2004
cheers,
ski
--
"When we try to pick out anything by itself, we find it
connected to the entire universe" John Muir
Chris "Ski" Kacoroski, ckacoroski at nsd.org, 425-489-6263
More information about the Moin-user
mailing list