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

« back to all changes in this revision

Viewing changes to ivle/dispatch/request.py

  • Committer: William Grant
  • Date: 2009-04-28 06:25:11 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428062511-t1co8dmnfi3abp7x
Add Request.make_path, to replace ivle.util.make_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
293
293
        else:
294
294
            mod_python.Cookie.add_cookie(self.apache_req, cookie, value, **attributes)
295
295
 
 
296
    def make_path(self, path):
 
297
        """Prepend the IVLE URL prefix to the given path.
 
298
 
 
299
        This is used when generating URLs to send to the client.
 
300
 
 
301
        This method is DEPRECATED. We no longer support use of a prefix.
 
302
        """
 
303
        return os.path.join(self.config['urls']['root'], path)
 
304
 
296
305
    def unmake_path(self, path):
297
306
        """Strip the IVLE URL prefix from the given path, if present.
298
307
 
299
308
        Also normalises the path.
 
309
 
 
310
        This method is DEPRECATED. We no longer support use of a prefix.
300
311
        """
301
312
        path = os.path.normpath(path)
302
313
        root = os.path.normpath(self.config['urls']['root'])