This may be more of a Python question than Trac but hopefully you don't mind
too much.
I'm revising TracJSGantt to move some functionality into a second module. I
have two source files with application code in them. tracjsgantt.py has:
class TracJSGanttSupport(Component):
implements(IRequestFilter, ITemplateProvider)
...
class TracJSGanttChart(WikiMacroBase):
...
And tracpm.py has:
class ITaskScheduler(Interface):
...
class TracPM(Component):
...
But when I build and run that, I get
Internal Server Error
TracError: NameError: name 'ITaskScheduler' is not defined
In my ignorence of namespaces and such, I seems to me that both files are
included in the plugin and I haven't created any namespace or whatever so I
don't understand what's hiding the name.
I tried to refer to estimation tools plugin as a model because it uses multiple
files. There's a line in burndown.py that imports things from
"estimationtools.util" and the names there seem to refer to global functions in
utils.py. I guessed that maybe the file name without the extension is an
implicit namespace but when I tried to follow that model and add "from
tracjsgantt.tracpm import ITaskScheduler" that failed, too.
Specific advise or reference to a tutorial or clear working example would be
most welcome.
Chris
--
Christopher Nelson, Software Engineering Manager
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY 12019
Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com
--
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.