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

« back to all changes in this revision

Viewing changes to ivle/webapp/base/xhtml.py

Merge from new-dispatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import inspect
21
21
import os.path
 
22
import urllib
22
23
 
23
24
import genshi.template
24
25
 
184
185
 
185
186
    def __init__(self, req, exception):
186
187
        super(XHTMLUnauthorizedView, self).__init__(req, exception)
 
188
 
187
189
        if req.user is None:
188
190
            # Not logged in. Redirect to login page.
189
 
            req.throw_redirect('/') # XXX: Need proper URL.
 
191
            req.throw_redirect('/+login?' + 
 
192
                               urllib.urlencode([('url', req.uri)]))
190
193
 
191
194
        req.status = 403