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

« back to all changes in this revision

Viewing changes to ivle/webapp/security/views.py

  • Committer: William Grant
  • Date: 2009-04-28 06:18:14 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428061814-fiqynzwcmtk3dokn
Replace ivle.util.unmake_path with specialisations in Request and CGIRequest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    # This needs to be importable from outside Apache.
26
26
    pass
27
27
 
 
28
import ivle.util
28
29
import ivle.pulldown_subj
29
30
import ivle.webapp.security
30
31
from ivle.auth import authenticate, AuthError
61
62
        else:
62
63
            query_string = '?url=' + urllib.quote(nexturl, safe="/~")
63
64
 
64
 
        ctx['path'] = req.make_path('+login') + query_string
 
65
        ctx['path'] = ivle.util.make_path('+login') + query_string
65
66
 
66
67
        # If this succeeds, the user is invalid.
67
68
        user = ivle.webapp.security.get_user_details(req)
72
73
                # if you are not planning to display a ToS page - the ToS
73
74
                # acceptance process actually calls usrmgt to create the user
74
75
                # jails and related stuff.
75
 
                req.throw_redirect(req.make_path('+tos') + query_string)
 
76
                req.throw_redirect(ivle.util.make_path('+tos') + query_string)
76
77
            elif user.state == "pending":
77
78
                # FIXME: this isn't quite the right answer, but it
78
79
                # should be more robust in the short term.
151
152
        if req.method == "POST":
152
153
            req.logout()
153
154
        else:
154
 
            ctx['path'] =  req.make_path('+logout')
 
155
            ctx['path'] =  ivle.util.make_path('+logout')