annotate pylons_app/lib/base.py @ 106:a86c8de926b4

some fixes in graph tab. Little fixes in files
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 25 Apr 2010 23:26:14 +0200
parents a699c0088344
children 5e2470ebdbc6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
1 """The base Controller API
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
2
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
3 Provides the BaseController class for subclassing.
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
4 """
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
5 from pylons.controllers import WSGIController
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
6 from pylons.templating import render_mako as render
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
7 from pylons_app.model import meta
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
8
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
9 class BaseController(WSGIController):
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
10
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
11 def __call__(self, environ, start_response):
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
12 """Invoke the Controller"""
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
13 # WSGIController.__call__ dispatches to the Controller method
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
14 # the request is routed to. This routing information is
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
15 # available in environ['pylons.routes_dict']
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
16 try:
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
17 return WSGIController.__call__(self, environ, start_response)
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
18 finally:
51
a699c0088344 fixed sqlalchemy session bug,
marcink
parents: 17
diff changeset
19 meta.Session.remove()