Hi guys!
I'm a webware user and I want to test newer tecnologies, I like the way
cherrypy works and I was between turbogears and pylons, so I want to
give a try to turbogears. My goal is to port a large system build over
webware to turbogears. Well, I think I will have many question with the
time :D
The first one is about controllers.py. I like to organize my sites in
subsections, as above:
/site
/about
/services
/admin
I try to do an arrange like this in tg and I was sucessfull with 2
methods, the first one is...
. class Admin(controllers.RootController):
. @expose(template='cheetah:saraswati.templates.admin.index')
. def index(self):
. return {}
.
. class Root(controllers.RootController):
. @expose(template="cheetah:saraswati.templates.index")
. def index(self):
. return {}
.
. admin = Admin()
... and the second one:
. class Root(controllers.RootController):
. @expose(template="cheetah:saraswati.templates.index")
. def index(self):
. return {}
.
. class Admin(controllers.RootController):
. @expose(template='cheetah:saraswati.templates.admin.index')
. def index(self):
. return {}
. admin = Admin()
... And I think I could suppress the "admin = Admin()" line and get the
class autocall itself:
. class Root(controllers.RootController):
. @expose(template="cheetah:saraswati.templates.index")
. def index(self):
. return {}
.
. class admin(controllers.RootController): # admin will autocall
itself
. @expose(template='cheetah:saraswati.templates.admin.index')
. def index(self):
. return {}
What do you think? I have another question too. If I have 2 independent
project, suppose one is the site project and the other one is a pool
application. Is there a way to integrate the pool application inside
the site project. I think I can because I can insert another controller
inside the root controller, am I right?
Thanks for help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---