Hello,
I'm new in developing trac macros
I had to upgrade my trac site from 0.9.6 version into the new 0.11 and
i found the some macros doesn't work
I tried to reprogramm these macros but i'm having trouble in the Blog
Macro. (i got it in MacroBazaar, but there isn't a 0.11 version in
Trac Hacks)
I had to get two arguments from the url passed by GET and i don't know
how to do it
This is the old code:
***********************************************
def execute(hdf, args, env):
pagename = hdf.getValue("args.page", "WikiStart")
# we can accept two optional parameters: year and month, if not
provided, will use today's
timeToday = time.localtime()
year = int(hdf.getValue("args.year", str(timeToday.tm_year)))
month = int(hdf.getValue("args.month", str(timeToday.tm_mon)))
************************************************
year and month variables can be given in the macro call Blog
('WikiStart', 2007,12) or passed by GET
in the url like
http://lemonvm-osgv2.ai2.upv.es/osg/wiki/WikiStart?year=2007&month=12
In the new code i don't have hdf,
class BlogMacro(WikiMacroBase):
def expand_macro(self,formatter, name, content):
args, kwargs = parse_args(content, strict=True)
and i can't find the variables in the args array if they are passed by
GET
¿where can i find these variables?
Thank in advance for your help
ANA
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---