[Moin-user] interwiki include macro

Shchupak, Vitaliy Vitaliy.Shchupak at deshaw.com
Sat Dec 15 14:10:04 EST 2007


You could use RequestCLI to execute the Include macro in another request
using something like this:
 
from MoinMoin.request import RequestCLI
from MoinMion.user import User
from MoinMoin.formatter.text_html import Formatter
def execute(macro, args):
    # <extract wikiname from args>
    subreq = RequestCLI('localhost/' + wikiname)
    subreq.user = user.User(subreq, name=macro.request.user.name)
    formatter = Formatter(subreq)
    subreq.formatter = formatter
    # now call the Include macro from here on subreq...
    ...
 
Vitaliy



________________________________

	From: moin-user-bounces at lists.sourceforge.net
[mailto:moin-user-bounces at lists.sourceforge.net] On Behalf Of james
bardin
	Sent: Friday, December 14, 2007 11:02 PM
	To: moin-user at lists.sourceforge.net
	Subject: [Moin-user] interwiki include macro
	
	
	Hello,
	
	We have a bunch of departments using separate wikis, but all on
the same server in a wikifarm.
	
	I would really love to have an Include() macro that works
between the wikis, something like <<InterwikiInclude(Wikiname,
PageName)>> 
	We use a common login system for the wikis, so usernames are
transferable, and acls could be be correctly enforced.
	
	I have no problem writing the macro myself, I just have no idea
where to start.
	Could anyone tell me if they think this is possible in a sane
manner? 
	
	Thanks
	-jim
	
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20071215/87767817/attachment.html>


More information about the Moin-user mailing list