Differences between revisions 2 and 3
Revision 2 as of 2009-07-06 21:54:45
Size: 621
Comment:
Revision 3 as of 2009-07-06 21:55:24
Size: 617
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Structure ==
=== SubController/Controller Class ===
= Structure =
== SubController/Controller Class ==

Structure

SubController/Controller Class

  • If you know it will take a lot of code you can start working in a seperate file outside of root.py. We will create IT page. :

cd myapp/controllers/
cp controller.tempalate it.py
  • Edit it.py and see what is in it.
  • Now Edit root.py and add the following inside your Base controller.

    from myapp.controllers.it import SampleController
    it = SampleController()

MyWiki: TurboGears2/Structure (last edited 2009-09-06 02:49:39 by localhost)