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

« back to all changes in this revision

Viewing changes to ivle/webapp/media.py

Expose media on the public site.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import ivle.conf
29
29
from ivle.config import Config
30
30
from ivle.webapp.base.views import BaseView
31
 
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
 
31
from ivle.webapp.base.plugins import PublicViewPlugin, ViewPlugin, MediaPlugin
32
32
from ivle.webapp.errors import NotFound, Forbidden
33
33
 
34
34
def media_url(req, plugin, path):
140
140
                                    usegmt=True)
141
141
        return super(VersionedMediaFileView, self)._make_filename(req)
142
142
 
143
 
class Plugin(ViewPlugin):
 
143
class Plugin(ViewPlugin, PublicViewPlugin):
144
144
    urls = [
145
145
        ('+media/+:version/:ns/*path', VersionedMediaFileView),
146
146
        ('+media/:ns/*path', MediaFileView),
147
147
    ]
 
148
 
 
149
    public_urls = urls