I'd like to have my controllers in {mypackage}.web.controllers, instead of the
default {mypackage}.controllers, but I've not found how to do so in the
documentation. Any hint?
Thanks in advance.
--
Gustavo Narea.
General Secretary. GNU/Linux Matters.
http://www.gnulinuxmatters.org/
You are talking about TG 1? Look in the "commands.py" file. That's were
the Root controller is imported and mounted.
Chris
In TG2 you can subclass AppConfig for this. After reading the source
(ie: I haven't tried it) I think the way to do it is (Mark, correct me
if I'm wrong):
in yourapp/config/app_cfg.py
from tg.config import AppConfig
class MyConfig(AppConfig):
def setup_paths(self):
root = os.path.dirname(os.path.abspath(
self.package.__file__))
self.paths = dict(root=root,
controllers=os.path.join(root, 'web',
'controllers'), # <-- Note the 'web' path component
static_files=os.path.join(root, 'public'),
templates=[os.path.join(root, 'templates')
base_config = MyConfig()
Alberto
Thanks for your answer! Unfortunately, it won't work because of this bug:
http://trac.turbogears.org/ticket/1932
BTW, please take a look at this: http://trac.turbogears.org/ticket/1931
Cheers!
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "TurboGears Trunk" group. To post to this group, send email to
> turbogea...@googlegroups.com To unsubscribe from this group, send
> email to turbogears-tru...@googlegroups.com For more options,
> visit this group at http://groups.google.com/group/turbogears-trunk?hl=en
> -~----------~----~----~----~------~----~------~--~---