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

« back to all changes in this revision

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

Move ivle.webapp.tutorial's media to the new framework. This also fixes the
omission of tutorial.css from SubjectView, which made it rather ugly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        self.subject = req.store.find(Subject, code=subject).one()
72
72
 
73
73
    def populate(self, req, ctx):
 
74
        self.plugin_styles[Plugin] = ['tutorial.css']
 
75
 
74
76
        if not self.subject:
75
77
            raise NotFound()
76
78
 
160
162
        self.worksheetname = worksheet
161
163
 
162
164
    def populate(self, req, ctx):
163
 
        req.scripts = [
164
 
            "/media/common/util.js",
165
 
            "/media/common/json2.js",
166
 
            "/media/tutorial/tutorial.js",
167
 
        ]
168
 
        req.styles = [
169
 
            "/media/tutorial/tutorial.css",
170
 
        ]
 
165
        self.plugin_scripts[Plugin] = ['tutorial.js']
 
166
        self.plugin_styles[Plugin] = ['tutorial.css']
171
167
 
172
168
        if not self.subject:
173
169
            raise NotFound()
477
473
                '+attempts/:username/:date', AttemptRESTView),
478
474
        ('api/subjects/:subject/+worksheets/:worksheet/*exercise', ExerciseRESTView),
479
475
    ]
 
476
 
 
477
    media = 'media'