[Moin-user] macro writing help!

Matt Price matt.price at utoronto.ca
Sun Oct 17 18:39:01 EDT 2004

hey folks,

I've written a primitive python client to interface with a database
service (refdb, http://refdb.sf.net).  I want to write a (set
of?) macro(s) that permits the user to embed three kinds of forms in a
wiki page:  
1) an "add references" form that lets you add records to the database;
2) a "search database" form that lets you search the database;
3) an "attached references" form that displays a daabase query result
in a user-friendly way, along wiht checkboxes that let you modify the
data in various ways.  

I've got code for these forms in my module already, so that I can
write a simple macro of the form:  

import re 
from MoinMoin import config 
from MoinMoin import wikiutil 
import MoinMoin.macro.Include 
from refdb_module import * 
def execute(macro, args): 
    ret = '' 
    form = AddRefForm() 
    ret = form.CreateForm() 
    return ret

but I need to be able to pass parameters to the form, like the name
and URL of the page from which the macro is called. It's not clear to
me how to do that.  Is there documentation on this somewhere?  I'd be
happy to look through the source code if someone would tell me where
tto look...  

Matt Price	    matt.price at utoronto.ca
History Department, University of Toronto
(416) 978-2094

please don't use the following addresses:  zeus at derailleur.org
aardvark at derailleur.org

More information about the Moin-user mailing list