~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

Fix some issues with undefined variables in view template contexts. Genshi 0.5
is much less lenient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
from ivle.dispatch.request import Request
47
47
from ivle.dispatch import login
48
48
from ivle.webapp.base.plugins import ViewPlugin
49
 
from ivle.webapp.errors import HTTPError, Unauthorized
 
49
from ivle.webapp.errors import HTTPError
50
50
import apps
51
51
import html
52
52
 
65
65
    'ivle.webapp.media#Plugin',
66
66
    'ivle.webapp.forum#Plugin',
67
67
    'ivle.webapp.help#Plugin',
68
 
    'ivle.webapp.tos#Plugin',
69
68
70
69
 
71
70
def generate_route_mapper(view_plugins):
157
156
        try:
158
157
            # Instantiate the view, which should be a BaseView class
159
158
            view = viewcls(req, **kwargs)
160
 
 
161
 
            # Check that the request (mainly the user) is permitted to access
162
 
            # the view.
163
 
            if not view.authorize(req):
164
 
                raise Unauthorized()
165
159
            # Render the output
166
160
            view.render(req)
167
161
        except HTTPError, e: