~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-12-14 04:17:46 UTC
  • Revision ID: me@williamgrant.id.au-20091214041746-eurw04xssf4cvszc
Add ivle-dev-setup, a script to do most of the heavy lifting when setting up a new dev installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
            return os.path.join(plugindir, mediadir, self.path)
95
95
 
96
96
class MediaFileView(BaseView):
97
 
    def authorize(self, req):
98
 
        return True
 
97
    permission = None
99
98
 
100
99
    def render(self, req):
101
100
        # If it begins with ".." or separator, it's illegal. Die.
131
130
    def get_filename(self, req):
132
131
        return self.context.filename
133
132
 
 
133
    def get_permissions(self, user):
 
134
        return set()
 
135
 
134
136
def root_to_media(root, *segments):
135
137
    if segments[0].startswith('+'):
136
138
        if segments[0] == '+external':