I actually moved my new functions to other sub_folders and then just called these functions from my main-controller (subsequent to importing of course) This makes the main controller alot neater and compact :-)
On 11/8/06, Ian Wilson <[EMAIL PROTECTED]
> wrote:
Hello,
Its not clear to me what you are asking here. What do you mean
outside of the form? You can make subcontroller classes like this:
class SubController(turbogears.controllers.Controller):
@expose()
def index(self):
return dict()
class Root(turbogears.controllers.Controller ):
subcontroller = SubController()
Then you could access /subcontroller/ or /subcontroller/index. And
also you could add additional methods as needed. Also notice you
could move that SubController class to an outside module and import it
and do the same thing.
I actually have a directory(python package if you like to call it
that) called controllers/ that houses my controllers and it has
multiple directories with subdirectories. Its a zoo. It does help to
modularize though.
Tell me if I am being unclear or this is totally not answering your question.
-Ian
--
Hamilton Ganesan
ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø
Bioinformatics & Computational Biology Unit
Department Biochemistry
FABI Square/Bioinformatics building
Faculty of Natural Sciences
University of Pretoria
Lynwood Rd
Pretoria
South Africa
0001
Tel : +27 12 420 5802
Fax : +27 12 420 5800
ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø
E-MAIL: [EMAIL PROTECTED]
URL : http://www.bi.up.ac.za/~hamilton
ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø
"God is not mocked, for whatever a man sows, that will he reap" (Gal. 6:7)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

