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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/user.py

  • Committer: William Grant
  • Date: 2009-07-04 11:52:38 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-20090704115238-yy83ydzndrsw8xks
Drop i.w.a.user's custom __init__s.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    """
39
39
    A REST interface to the user object.
40
40
    """
41
 
    def __init__(self, req, context):
42
 
        super(UserRESTView, self).__init__(self, req, context)
43
 
        self.context = context
44
41
 
45
42
    @require_permission('view')
46
43
    def GET(self, req):
59
56
    tab = 'settings'
60
57
    permission = 'edit'
61
58
 
62
 
    def __init__(self, req, context):
63
 
        self.context = context
64
 
 
65
59
    def populate(self, req, ctx):
66
60
        self.plugin_scripts[Plugin] = ['settings.js']
67
61
        self.scripts_init = ['revert_settings']
70
64
 
71
65
def root_to_user(root, segment):
72
66
    if not segment.startswith('~'):
73
 
        raise RoutingError()
 
67
        return None
74
68
    return ivle.database.User.get_by_login(root.store, segment[1:])
75
69
 
76
70
class Plugin(ViewPlugin, MediaPlugin):