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

« back to all changes in this revision

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

Dispatch now generates an index for each plugin type, allowing plugins to
be written which are aware of other plugins, and other plugin types.

All view plugins now subclass from ivle.webapp.base.plugins.ViewPlugin,
as opposed to subclassing BasePlugin directly. This will allow us to
easily re-write console as an OverlayPlugin, and allow future new
plugins types to be created.

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 BasePlugin
 
42
from ivle.webapp.base.plugins import ViewPlugin
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
446
446
 
447
447
    store.commit()
448
448
 
449
 
class Plugin(BasePlugin):
 
449
class Plugin(ViewPlugin):
450
450
    urls = [
451
451
        ('subjects/:subject/+worksheets', SubjectView),
452
452
        ('subjects/:subject/+worksheets/+media/*(path)', SubjectMediaView),