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

« back to all changes in this revision

Viewing changes to ivle/webapp/media.py

  • Committer: William Grant
  • Date: 2009-07-30 08:11:33 UTC
  • mto: (1294.2.116 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090730081133-qpf554hidfzm7ogs
Router->Publisher

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
           self.context.path.startswith('/'):
103
103
            raise Forbidden()
104
104
 
105
 
        filename = self.get_filename(req)
 
105
        filename = self.context.filename
106
106
        if filename is None:
107
107
            raise NotFound()
108
108
 
127
127
        req.content_type = type
128
128
        req.sendfile(filename)
129
129
 
130
 
    def get_filename(self, req):
131
 
        return self.context.filename
132
 
 
133
 
    def get_permissions(self, user, config):
 
130
    def get_permissions(self, user):
134
131
        return set()
135
132
 
136
133
def root_to_media(root, *segments):
163
160
class Plugin(ViewPlugin, PublicViewPlugin):
164
161
    forward_routes = [(ApplicationRoot, '+media', root_to_media, INF)]
165
162
    views = [(MediaFile, '+index', MediaFileView)]
166
 
    public_forward_routes = forward_routes
167
 
    public_views = views