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

« back to all changes in this revision

Viewing changes to ivle/webapp/media.py

  • Committer: William Grant
  • Date: 2010-02-26 02:35:30 UTC
  • Revision ID: grantw@unimelb.edu.au-20100226023530-0m5t99dwf0prfowv
Move PotentiallySecureFileSession into the try/export import block, so ivle.dispatch.request can be imported from outside Apache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
# This maps a media namespace to an external dependency directory (in this
35
35
# case specified by the configuration option media/externals/jquery) and a
36
36
# list of permitted subpaths.
37
 
EXTERNAL_MEDIA_MAP = {'jquery': ('jquery', ['jquery.js']),
38
 
                      'codemirror': ('codemirror', None),
39
 
                      }
 
37
EXTERNAL_MEDIA_MAP = {'jquery': ('jquery', ['jquery.js'])}
40
38
 
41
39
def media_url(req, plugin, path):
42
40
    '''Generates a URL to a media file.
72
70
                return None
73
71
 
74
72
            # Unless it's a whitelisted path, we don't want to hear about it.
75
 
            # If the whitelist is None (not []), we allow all.
76
 
            if extern[1] is not None and self.path not in extern[1]:
 
73
            if self.path not in extern[1]:
77
74
                return None
78
75
 
79
76
            # Grab the admin-configured path for this particular external dep.