Mercurial > sat_legacy_website
comparison sat_website/utils.py @ 58:746e53efc188
allow large media files (screencasts) to be stored on an external server
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 14 May 2015 23:37:56 +0200 |
parents | 1a0f24401866 |
children | b1c16cd53b62 |
comparison
equal
deleted
inserted
replaced
57:bfa8009f0769 | 58:746e53efc188 |
---|---|
42 name = dir | 42 name = dir |
43 path = join(dir, name) + settings.ARCHIVE_SUFFIX # e.g urwid-satext/urwid_satext.tar.bz2 | 43 path = join(dir, name) + settings.ARCHIVE_SUFFIX # e.g urwid-satext/urwid_satext.tar.bz2 |
44 int_path = join(settings.PROJECTS_INTERNAL_PATH, path) # this is a symbolic link | 44 int_path = join(settings.PROJECTS_INTERNAL_PATH, path) # this is a symbolic link |
45 # base name of the real path MUST look like: <project>-<version><ARCHIVE_SUFFIX> | 45 # base name of the real path MUST look like: <project>-<version><ARCHIVE_SUFFIX> |
46 version = basename(realpath(int_path))[len(name) + 1:-len(settings.ARCHIVE_SUFFIX)] | 46 version = basename(realpath(int_path))[len(name) + 1:-len(settings.ARCHIVE_SUFFIX)] |
47 ext_path = join(settings.PROJECTS_EXTERNAL_PATH, path) | 47 ext_path = join(settings.PROJECTS_EXTERNAL_URL, path) |
48 result[name] = (ext_path, version, infos[name] if name in infos else '') | 48 result[name] = (ext_path, version, infos[name] if name in infos else '') |
49 | 49 |
50 return result | 50 return result |
51 | 51 |
52 def get_libervia_demo_url(): | 52 def get_libervia_demo_url(): |