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

« back to all changes in this revision

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

Require that plugins providing media subclass MediaPlugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
import ivle.worksheet
40
40
from ivle.webapp.base.views import BaseView
41
41
from ivle.webapp.base.xhtml import XHTMLView
42
 
from ivle.webapp.base.plugins import ViewPlugin
 
42
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
43
43
from ivle.webapp.media import MediaFileView
44
44
from ivle.webapp.errors import NotFound, Forbidden
45
45
from ivle.webapp.tutorial.rst import rst as rstfunc
445
445
 
446
446
    store.commit()
447
447
 
448
 
class Plugin(ViewPlugin):
 
448
class Plugin(ViewPlugin, MediaPlugin):
449
449
    urls = [
450
450
        ('subjects/:subject/+worksheets', SubjectView),
451
451
        ('subjects/:subject/+worksheets/+media/*(path)', SubjectMediaView),