Re: macro members/methods
Matt Price <[email protected]> Wed, 20 Oct 2004 12:49:01 -0400
| Newsgroups | gmane.comp.web.wiki.moin.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Oct 20, 2004 at 06:06:33PM +0200, Thomas Waldmann wrote: > >I'm trying to learn more about how macros work. can someone point me > >in the right direction in perms of learning about macro methods and > >attributes? > > Just look into MoinMoin/macro/*.py - the easiest to start with is BR.py > (that is the code for [[BR]]). :) > > Macros just get called by moin with some parameter string they have to > parse on their own. Then they should call the formatter to generate HTML > (or other output) and return the result at the end. thanks thomas. I was wondering I guess about the request object & some other things that macro has access to -- in particular because I want to (1) have access to the Page name and basee URL of the current page (2) have access to the cgi environment variables -- I have a macro that generates a form, & would like to be able to have another macro interpret the form data (so I don't have to send the user to a non-wiki cgi page). I have looked at /usr/lib/python2.3/site-packages/MoinMoin/request.py and htat helps, but I'm not so sure about form data yet. the RequestBase._setup_args_from_cgi_form() method seems to be what I'm looking for, but I know that cgi.FieldStorage should only be called once. can I have more than one macro in a page that accesses the form data? (I know that sounds strange, but I'm thinking about an unusual situation). thanks, matt > > > > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Moin-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/moin-devel ------------------------------------------- Matt Price [email protected] History Department, University of Toronto (416) 978-2094 -------------------------------------------- please don't use the following addresses: [email protected] [email protected] ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl