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

« back to all changes in this revision

Viewing changes to ivle/webapp/tos/__init__.py

  • Committer: William Grant
  • Date: 2009-07-04 13:45:55 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090704134555-bddrm0gf13n1of8x
ToS ported...

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import ivle.webapp.security
27
27
from ivle.webapp.base.xhtml import XHTMLView
28
28
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
 
29
from ivle.webapp import ApplicationRoot
29
30
 
30
31
def get_terms_of_service(config):
31
32
    """
67
68
 
68
69
    allow_overlays = False
69
70
 
70
 
    def __init__(self, req):
 
71
    def __init__(self, req, context, subpath=None):
 
72
        super(TermsOfServiceView, self).__init__(req, context, subpath)
71
73
        # We need to be able to handle the case where a user has status
72
74
        # 'no_agreement'. In that case, req.user will be None, so we have
73
75
        # to get it ourselves.
94
96
 
95
97
class Plugin(ViewPlugin, MediaPlugin):
96
98
    """Registration for the Terms of Service plugin."""
97
 
    urls = [
98
 
        ('+tos', TermsOfServiceView),
99
 
    ]
 
99
    views = [(ApplicationRoot, '+tos', TermsOfServiceView)]
100
100
 
101
101
    media = 'media'