Re: macro members/methods

Florian Festi <[email protected]> Wed, 20 Oct 2004 20:53:39 +0200 (METDST)
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <Pine.GHP.4.61.0410202024460.18874@rupert.informatik.uni-stuttgart.de>
> 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

I just addedsome lines to MoinMoin:MoinDev/PluginConcept

> (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).

You probably want to use an action insted of a second macro or make the 
macro behave different if the form parameters are set.

Form data gets copied into request.form with is a dict of lists.

 	cu

 		FlorianFesti


-------------------------------------------------------
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