Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (45 sloc) 2.958 kb

The TurboGears documentation

The TurboGears Web Framework

TurboGears is an :ref:`ObjectDispatch <writing_controllers>` based Python web development framework made for rapid projects development.

from tg import expose
from helloworld.lib.base import BaseController

class RootController(BaseController):
     def index(self):
         return "<h1>Hello World</h1>"

TurboGears is meant to run inside python virtualenv and provides its own private index to avoid messing with your system packages and to provide a reliable set of packages that will correctly work together.

$ virtualenv --no-site-packages tg2env
$ source tg2env/bin/activate
(tg2env)$ easy_install -i tg.devtools

To try TurboGears feel free to quickstart a new TurboGears application and start playing around:

(tg2env)$ paster quickstart -n -x example
(tg2env)$ cd example/
(tg2env)$ python develop
(tg2env)$ paster serve development.ini

Visiting http://localhost:8080/index you will see a ready made sample application with a brief introduction to the framework itself.

Explore the :ref:`TurboGears Tutorials <tutorials>` to get started with TurboGears!

Jump to Line
Something went wrong with that request. Please try again.