# HG changeset patch # User grandjoncl # Date 1354102287 -3600 # Node ID c2d9d1c6c228913573e06b8d2cc1e757429307f5 # Parent a6a37775a76dd0a1aa56b61172ada2422fd99b14# Parent 94f9d36371f6078821a0347ae2643320019de797 Merge with 8251c6a02d6fc48c19f241f8055ceac0017ac457 diff -r 94f9d36371f6 -r c2d9d1c6c228 .DS_Store Binary file .DS_Store has changed diff -r 94f9d36371f6 -r c2d9d1c6c228 .hgignore --- a/.hgignore Wed Nov 28 12:27:08 2012 +0100 +++ b/.hgignore Wed Nov 28 12:31:27 2012 +0100 @@ -1,19 +1,8 @@ syntax: regexp -^web/index$ -^web/log$ -^virtualenv/web/env/ .*\.pyc$ -^virtualenv/web/project-boot\.py$ -^web/ldtplatform/config\.py$ -^web/ldtplatform/\.htaccess$ -^web/\.htaccess$ -^virtualenv/web/distribute-0\.6\.14\.tar\.gz$ ^src/ldt/Ldt\.egg-info$ ^src/ldt/dist$ -^web/static/media/ldt$ -^web/static/site/admin$ -^web/static/site/ldt$ ^virtualenv/setup/project-boot\.py$ ^virtualenv/setup/env/ ^src/ldt/build$ @@ -23,16 +12,5 @@ ^src/ldt/MANIFEST\.in$ ^src/ldt/MANIFEST$ ^\.pydevproject$ -^web/static/media/cache$ ^\.settings/org\.eclipse\.core\.resources\.prefs$ -^web/static/media/thumbnails$ -^virtualenv/sync/env - -syntax: regexp -^sbin/sync/config\.py$ -syntax: regexp -^virtualenv/sync/project-boot\.py$ -relre:^.metadata - -syntax: regexp -^web/\.htusers$ \ No newline at end of file +\.DS_Store$ diff -r 94f9d36371f6 -r c2d9d1c6c228 .hgtags --- a/.hgtags Wed Nov 28 12:27:08 2012 +0100 +++ b/.hgtags Wed Nov 28 12:31:27 2012 +0100 @@ -127,3 +127,10 @@ d49f0e0e0a52880228a8bf83e75ad02971db569e V01.30 ba35e8803c76b87d68a4c95f180cebf35d71b73f V01.31 10b2e464af09e56809b3c9e4209f88297fa7f5c0 V01.32 +caa3a2695cb7710bbab7970ebd0e0b28eea140a9 V01.33 +caa3a2695cb7710bbab7970ebd0e0b28eea140a9 V01.33 +41eb88128c8fad65408b2db4965ffda6c75d21bc V01.33 +659ca382a67d90fd7fdda8c4f422091434c97d86 V01.34 +a05ad02125c58e419fcbd52475c9f39be35f576e V01.35 +a774af5e10f40b65dd1ec748ad36e9ed4e9a294e V01.36 +89e3320ac56c863333e3e5317d1c7fced478cc05 V01.36 diff -r 94f9d36371f6 -r c2d9d1c6c228 .settings/org.eclipse.core.resources.prefs --- a/.settings/org.eclipse.core.resources.prefs Wed Nov 28 12:27:08 2012 +0100 +++ b/.settings/org.eclipse.core.resources.prefs Wed Nov 28 12:31:27 2012 +0100 @@ -1,44 +1,42 @@ -eclipse.preferences.version=1 -encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8 -encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8 -encoding//src/ldt/ldt/indexation/highlighter.py=utf-8 -encoding//src/ldt/ldt/indexation/models.py=utf-8 -encoding//src/ldt/ldt/indexation/query_parser.py=utf-8 -encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8 -encoding//src/ldt/ldt/indexation/tests.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0024_auto__chg_field_tag_name.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8 -encoding//src/ldt/ldt/management/utils.py=utf-8 -encoding//src/ldt/ldt/test/test_runner.py=utf-8 -encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8 -encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8 -encoding//virtualenv/web/env/venv_platform/lib/python2.7/site-packages/haystack/backends/__init__.py=utf-8 -encoding//web/ldtplatform/config.py=utf-8 -encoding//web/ldtplatform/settings.py=utf-8 -encoding/=UTF-8 +eclipse.preferences.version=1 +encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8 +encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8 +encoding//src/ldt/ldt/indexation/highlighter.py=utf-8 +encoding//src/ldt/ldt/indexation/models.py=utf-8 +encoding//src/ldt/ldt/indexation/query_parser.py=utf-8 +encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8 +encoding//src/ldt/ldt/indexation/tests.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0024_auto__chg_field_tag_name.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0025_chg_site_domain.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8 +encoding//src/ldt/ldt/management/utils.py=utf-8 +encoding//src/ldt/ldt/test/test_runner.py=utf-8 +encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8 +encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8 +encoding/=UTF-8 diff -r 94f9d36371f6 -r c2d9d1c6c228 sbin/sync/config.py.tmpl --- a/sbin/sync/config.py.tmpl Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -from fabric.api import env - -env.hosts = ['iri@web.iri.centrepompidou.fr'] - -env.web_group = 'www-data' -env.folders = ['log', 'static/media'] - -env.base_export_path = "~/tmp" -env.export_prefix = "platform" -env.remote_web_path = "/iridata/www/ldt/" -env.platform_web_module = "ldtplatform" -env.remote_ldt_base_path = "/tmp" -env.remote_virtualenv_path = "/iridata/virtualenv/ldt" -env.remote_venv_export_path = "/iridata/users/iri/tmp" -env.remote_baseline_venv = "/iridata/virtualenv/baseline2.7" -env.web_rsync_filters = [ - "+ core", - "P .htpasswd", - "P .htaccess", - "P ldtplatform/.htaccess", - "P ldtplatform/config.py", - "P ldtplatform/modwsgi.wsgi", - "P robots.txt", - "P env/***", - "P log/***", - "P index/***", - "P static/media/***", - "P crossdomain.xml", -] -env.venv_rsync_filters = [ - "+ core", -] -env.web_relaunch_cmd = "supervisorctl restart platform" - -env.base_url = "/" -env.web_url = "http://ldt.iri.centrepompidou.fr" -env.stream_url = "rtmp://media.iri.centrepompidou.fr/ddc_player/" - -env.stream_src_prefix = "" -env.ffmpeg_path = "/usr/bin/ffmpeg" - -env.db_engine = 'django.db.backends.postgresql_psycopg2' -env.db_name = 'platform' -env.db_user = 'iriuser' -env.db_password = '' -env.db_host = 'sql.iri.centrepompidou.fr' -env.db_port = 5432 - -env.log_file = env.remote_web_path + '/log/log.txt' - -env.google_analytics_code = "" - -env.email_use_tls = True -env.email_host = "" -env.email_host_user = "" -env.email_host_user = "" -env.email_port = "" - -env.forbidden_stream_url = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=" - diff -r 94f9d36371f6 -r c2d9d1c6c228 sbin/sync/fabfile.py --- a/sbin/sync/fabfile.py Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,282 +0,0 @@ -from fabric.api import task, run, local, env, cd, put, prefix, sudo -from fabric.colors import green -from fabric.contrib.project import rsync_project -from fabric.contrib.files import exists, upload_template -from fabric.context_managers import settings -from mercurial import commands, ui, hg, cmdutil -import imp -import os, os.path -import shutil -import sys - -import config - -def get_export_path(version): - base_path = os.path.join(env.base_export_path,env.export_prefix).rstrip("/") - return os.path.expanduser(base_path) + "_%s" % (str(version)) - -def clean_export_folder(path): - print("Removing %s" % path) - if os.path.isdir(path): - shutil.rmtree(path, ignore_errors=True) - -def do_export_version(path, version): - print("Export version %s"%str(version)) - - local("hg archive -r \'%s\' \"%s\"" % (str(version),path)) - print("Export version %s done"%str(version)) - - -def get_remote_env(remotepath, remotevirtualenvpath, platform_web_module, settings_key): - activate_path = os.path.join(remotevirtualenvpath, "bin/activate") - res = "" - with prefix("source \"%s\"" % activate_path), prefix("export PYTHONPATH=\"%s\"" % remotepath), cd(remotepath): - tempfilepath = run("mktemp -t ldtplatform.XXXXXX") - with settings(warn_only=True): - run("echo \"import os\" > %s" % (tempfilepath)) - map(lambda str: run("echo \"%s\" >> %s" % (str, tempfilepath)), - ["os.environ.setdefault('DJANGO_SETTINGS_MODULE', '%s.settings')" % (platform_web_module), - "from django.conf import settings", - "print settings.%s" % (settings_key)]) - res = run("python < %s" % (tempfilepath)) - run("rm -f \"%s\"" % (tempfilepath)) - return res - - - -def rsync_export(path, remotepath, filters): - print("Rsync %s to %s",(path,remotepath)) - - filter_option_str = "--progress --stats" - if filters: - filter_option_str += " " + " ".join(["--filter \"%s\"" % (f) for f in filters]) - - run("mkdir -p \"%s\"" % remotepath) - rsync_project(remotepath, local_dir=path, extra_opts=filter_option_str, delete=True) - print("Rsync %s to %s done",(path,remotepath)) - -def clean_rsync_folder(remotepath): - print("clean rsync folder %s" % remotepath) - run("rm -fr \"%s\"" % remotepath) - -def build_src(path): - print("Build source dist at %s" % path) - f = None - try: - f, pathname, description = imp.find_module("setup", [path]) - print(" 2 Build source dist at %s" % path) - setup_mod = imp.load_module("setup", f, pathname, description) - print(" 3 Build source dist at %s" % path) - finally: - if f: - f.close() - - setup_mod.launch_setup("setup.py", ['sdist']) - - print("Build source dist at %s done" % path) - - -def get_src_version(path): - print("get src version at %s" % path) - f = None - try: - f, pathname, description = imp.find_module("ldt", [path]) - ldt_mod = imp.load_module("ldt", f, pathname, description) - finally: - if f: - f.close() - version = ldt_mod.VERSION - version_str = ldt_mod.get_version() - - return (version, version_str) - - -def sync_build(path): - print("Sync build %s" % path) - with cd(env.remote_ldt_base_path): - filename = os.path.basename(path) - res_trans = put(path, os.path.join(env.remote_ldt_base_path, filename)) - print("Sync build %s to %s" % (path,repr(res_trans))) - return res_trans - -def remove_build(path): - print("remove build build %s" % path) - run("rm \"%s\"" % path) - - -def install_build(remotepath, remotevirtualenvpath): - print("Install build %s in %s" % (remotepath, remotevirtualenvpath)) - activate_path = os.path.join(remotevirtualenvpath, "bin/activate") - - with prefix("source %s" % activate_path): - run("pip install \"%s\"" % remotepath) - -def collectstatic(remotepath, remotevirtualenvpath, platform_web_module): - print("Collect static in %s with %s" % (remotepath, remotevirtualenvpath)) - remotestaticsitepath = get_remote_env(remotepath, remotevirtualenvpath, platform_web_module, "STATIC_ROOT") - activate_path = os.path.join(remotevirtualenvpath, "bin/activate") - with prefix("source \"%s\"" % activate_path), prefix("export PYTHONPATH=\"%s\"" % remotepath), cd(remotepath): - #remocve old files optio -c of collect static fail ! - run("rm -fr \"%s\"" % (remotestaticsitepath)) - run("python manage.py collectstatic --noinput") - -def create_config(export_path): - print("Create config from %s" % (export_path,)) - remotepath = env.remote_web_path - remote_config_path = os.path.join(remotepath, env.platform_web_module, "config.py") - template_path = os.path.join(export_path, "web", env.platform_web_module, "config.py.tmpl") - - context = { - 'base_dir': os.path.join(remotepath, env.platform_web_module).rstrip("/")+"/", - 'base_url': env.base_url, - 'web_url': env.web_url, - 'stream_url': env.stream_url, - 'stream_src_prefix': env.stream_src_prefix, - 'ffmpeg_path': env.ffmpeg_path, - 'db_engine': env.db_engine, - 'db_name': env.db_name, - 'db_user': env.db_user, - 'db_password': env.db_password, - 'db_host': env.db_host, - 'db_port': env.db_port, - 'log_file': env.log_file, - 'google_analytics_code': env.google_analytics_code, - 'email_use_tls': env.email_use_tls, - 'email_host': env.email_host, - 'email_host_user': env.email_host_user, - 'email_host_user': env.email_host_user, - 'email_port': env.email_port, - 'forbidden_stream_url': env.forbidden_stream_url, - } - - if not exists(remote_config_path, verbose=True): - upload_template(template_path, remote_config_path, context=context) - -def export_version(version): - print("export version %s" % str(version)) - - export_path = get_export_path(version) - - clean_export_folder(export_path) - do_export_version(export_path,version) - - return export_path - -def do_create_virtualenv(remote_venv_export_path, remotevirtualenvpath): - print("Create virtualenv export_path : %s - remote venvpath : %s" % (remote_venv_export_path, remotevirtualenvpath)) - activate_path = os.path.join(remotevirtualenvpath, "bin/activate") - if "remote_baseline_venv" in env and env.remote_baseline_venv: - prefix_str = "source \"%s\"" % os.path.join(env.remote_baseline_venv, "bin/activate") - else: - prefix_str = "echo" - with settings(warn_only=True): - run("rm -fr \"%s\"" % remotevirtualenvpath) - run("mkdir -p \"%s\"" % remotevirtualenvpath) - with prefix(prefix_str), cd(os.path.join(remote_venv_export_path,"virtualenv","web")): - run("python create_python_env.py") - run("python project-boot.py \"%s\"" % remotevirtualenvpath) - with prefix("source \"%s\"" % activate_path): - run("pip install -r \"%s\"" % os.path.join(remote_venv_export_path,"virtualenv","web","res","srvr_requirements.txt")) - -def do_sync_ldt(version, export_path): - print("do_sync_ldt with version %s and path %s" % (version,export_path)) - src_path = export_path + "/src/ldt" - build_src(src_path) - (_,version_str) = get_src_version(src_path) - build_path = os.path.join(src_path,"dist","ldt-%s.tar.gz" % version_str) - sync_install_build(build_path) - - -def sync_install_build(build_path): - res_trans = None - try: - res_trans = sync_build(build_path) - install_build(res_trans[0], env.remote_virtualenv_path) - finally: - if res_trans: - remove_build(res_trans[0]) - - -def do_sync_web(version, export_path): - print("do_sync_web with version %s and path %s" % (version,export_path)) - web_path = os.path.join(export_path,"web/") - rsync_export(web_path, env.remote_web_path, env.web_rsync_filters) - -def check_folder_access(): - print("Check folder access") - # get remote user - for folder_path in env.folders: - if not os.path.isabs(folder_path): - folder_path = env.remote_web_path.rstrip("/")+ "/" + folder_path - with settings(warn_only=True): - if not exists(folder_path): - run("mkdir -p \"%s\"" % folder_path) - run("chown -R -c :%s \"%s\"" % (env.web_group, folder_path)) - run("chmod -R -c g+w \"%s\"" % folder_path) -@task -def relaunch_server(do_collectstatic=True): - print("Relaunch server") - check_folder_access() - if do_collectstatic: - collectstatic(env.remote_web_path, env.remote_virtualenv_path, env.platform_web_module) - sudo(env.web_relaunch_cmd, shell=False) - -@task -def sync_web(version): - print(green("sync web with version %s" % version)) - export_path = export_version(version) - do_sync_web(version, export_path) - create_config(export_path) - clean_export_folder(export_path) - relaunch_server() - -@task -def sync_ldt(version): - print(green("sync ldt with version %s" % version)) - export_path = export_version(version) - do_sync_ldt(version, export_path) - clean_export_folder(export_path) - relaunch_server() - -@task -def update_lib(version, package): - print(green("update ldt with version %s" % version)) - export_path = export_version(version) - lib_path = os.path.join(export_path, "virtualenv", "res", "lib") - - f, pathname, description = imp.find_module("patch", [lib_path]) - patch = imp.load_module("patch", f, pathname, description) - f, pathname, description = imp.find_module("lib_create_env", [lib_path]) - lib_create_env = imp.load_module("lib_create_env", f, pathname, description) - - package_path = os.path.join(export_path, "virtualenv", "res", "src", lib_create_env.URLS[package]['local']) - - sync_install_build(package_path) - clean_export_folder(export_path) - relaunch_server() - -@task -def sync_platform(version): - print(green("sync platform with version %s" % version)) - export_path = export_version(version) - do_sync_ldt(version, export_path) - do_sync_web(version, export_path) - create_config(export_path) - clean_export_folder(export_path) - relaunch_server() - -@task -def create_virtualenv(version): - print(green("create virtualenv with version %s" % version)) - export_path = export_version(version) - venv_remote_export_path = "" - try: - virtualenv_path = os.path.join(export_path, "virtualenv") - - venv_remote_export_path = os.path.join(env.remote_venv_export_path, env.export_prefix, version,"virtualenv") - rsync_export(virtualenv_path, venv_remote_export_path, env.venv_rsync_filters) - do_create_virtualenv(venv_remote_export_path, env.remote_virtualenv_path) - finally: - clean_export_folder(export_path) - if venv_remote_export_path: - clean_rsync_folder(venv_remote_export_path) diff -r 94f9d36371f6 -r c2d9d1c6c228 sbin/sync/sync_ldt_platform --- a/sbin/sync/sync_ldt_platform Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -e -if [ -d ~/tmp/platform_V$1 ]; then - rm -fr ~/tmp/platform_V$1; -fi - -hg archive -r V$1 ~/tmp/platform_V$1 - -#text2unix ~/tmp/platform_V$1 - -if [ -d ~/tmp/platform_V$1 ]; then - cat < + {% endblock %} {% load i18n %} {% block content %} @@ -13,7 +11,7 @@ - - - diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Wed Nov 28 12:31:27 2012 +0100 @@ -2,7 +2,6 @@ {% load i18n %} {% load thumbnail %} {% load front_tags %} -{% load absstatic %} {% block title %} {% if tag_label %} @@ -14,13 +13,13 @@ {% block js_import %} {{block.super}} - - + + {% endblock %} {% block css_import %} {{block.super}} - + {% endblock %} {% block js_declaration %} @@ -52,7 +51,7 @@ {% else %}{% trans 'All medias' %}{% endif %}
  • - {% trans 'Filter the medias' %}{% trans 'Filter the medias' %} {% trans 'Filter the medias' %} + {% trans 'Filter the medias' %}{% trans 'Filter the medias' %} {% trans 'Filter the medias' %}
  • diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/front/front_base.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_base.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_base.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,6 @@ {% load i18n %} {% load logintag %} {% load navigation %} -{% load absstatic %} {% load analytics %} @@ -10,15 +9,15 @@ {% block head %} - + {% block title %}Lignes de temps{% endblock %} {% block js_import %} - - + + {% endblock %} {% block css_declaration %}{% endblock %} {% block css_import %} - + {% endblock %} {% block js_declaration %} - + + {% endblock %} {% block css_import %} {{block.super}} - + {% endblock %} {% block js_declaration %} @@ -42,7 +42,7 @@ diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/front/front_player.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_player.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_player.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,15 +1,14 @@ {% extends "front/front_base.html" %} {% load i18n %} {% load thumbnail %} -{% load absstatic %} {% block title %}Lignes de temps : {% trans 'Annotate' %} "{{content.title}}"{% endblock %} {% block css_import %} {{block.super}} - - - + + + {% endblock %} {% block js_declaration %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/front/front_search_results.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,19 +1,18 @@ {% extends "front/front_base.html" %} {% load i18n %} {% load thumbnail %} -{% load absstatic %} {% load front_tags %} {% block title %}Lignes de temps : {% trans 'search' %} "{{search}}" {% endblock %} {% block js_import %} {{block.super}} - + {% endblock %} {% block css_import %} {{block.super}} - + {% endblock %} {% block js_declaration %} @@ -41,7 +40,7 @@ var global_csrf_token = "{{ csrf_token }}"; - + {% endblock %} {% block body %} @@ -107,7 +106,7 @@
  • - +

    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/content_list.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/content_list.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/content_list.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,6 +1,5 @@ {% extends "ldt/user/user_base.html" %} {% load i18n %} -{% load absstatic %} {% block js_declaration %} {{block.super}} @@ -48,7 +47,7 @@ {% block css_import %} {{block.super}} - + {% endblock %} {% block breadcrumb %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,11 +1,11 @@ {% extends "ldt/ldt_raw_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of copy of project ldt #} {% block css_import %} {{ block.super }} - - - + + + {% endblock %} {% block body %}
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,5 @@ {% extends "ldt/ldt_utils/workspace_base.html" %} {% load i18n %} -{% load absstatic %} -{% load absurl %} {# form of creation of content #} {% load adminmedia %} @@ -11,11 +9,11 @@ - - - - - + + + + + {{ content_form.media.js }} {% endblock %} @@ -30,7 +28,7 @@ "{{cookie_name}}" : "{{session_key}}"}; onCreateContentReady("{% url ldt.ldt_utils.views.content.upload %}", - '{% absstatic "ldt" %}', + "{{LDT_MEDIA_PREFIX}}", post_added_params, '{% trans "Browse" %}', '{% trans "File uploaded" %}', @@ -56,11 +54,11 @@ {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - - - - + + + + + {% endblock %} @@ -138,7 +136,7 @@
    -
    loader
    +
    loader
    {% trans "media file is being processed please wait." %}
     
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,25 +1,23 @@ {% extends "ldt/ldt_utils/workspace_base.html" %} {% load i18n %} -{% load absstatic %} -{% load absurl %} {% load adminmedia %} {% load thumbnail %} {% block js_import %} {{ block.super }} - - - + + + {{ content_form.media.js }} {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - - + + + {% endblock %} @@ -44,7 +42,7 @@ $( this ).find("button[type=submit]").removeClass("e-clicked"); }); - var search_url = "{% absurl ldt.ldt_utils.views.workspace.share_filter filter='__FILTER__' use_groups='false' %}"; + var search_url = "{% url ldt.ldt_utils.views.workspace.share_filter filter='__FILTER__' use_groups='false' %}"; }); @@ -55,7 +53,7 @@
    {% if group_id %}{% trans "Update a group" %}{% else %}{% trans "Create a group" %}{% endif %}
    -
    + {% csrf_token %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,23 +1,23 @@ {% extends "ldt/ldt_raw_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of creation of content #} {% load adminmedia %} {% block js_import %} {{ block.super }} - + - - + + {{ content_form.media.js }} {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - - + + + {% endblock %} {% block js_declaration %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,5 @@ {% load i18n %} {% load thumbnail %} -{% load absstatic %} -{% load absurl %} {% load analytics %}
    - + - - - + + + + {{ content_form.media.js }} {% endblock %} @@ -26,21 +23,12 @@ var translate_show="{% trans 'Show Player' %}"; var translate_hide="{% trans 'Hide Player' %}"; var WEB_URL='{{WEB_URL}}'; + var LDT_MEDIA_PREFIX='{{LDT_MEDIA_PREFIX}}'; var LANGUAGE_CODE='{{LANGUAGE_CODE}}'; var json_url='{{json_url}}'; var player_id='{{player_id}}'; - var defaultDir='{% absstatic "ldt/js/" %}'; - var jwPlayerSWF='{% absstatic "ldt/swf/player.swf" %}'; - var recordMicSwf='{% absstatic "ldt/swf/record_mic.swf" %}'; - var zeroClipboardSwf='{% absstatic "ldt/swf/ZeroClipboard10.swf" %}'; - var cssjQueryUI='{% absstatic "ldt/css/jq-css/themes/base/jquery-ui.css" %}'; - var widgetsDir='{% absstatic "ldt/metadataplayer" %}'; - var configCss='{% absstatic "ldt/metadataplayer/LdtPlayer-core.css" %}'; - var default_thumbnail='{% absstatic "ldt/css/imgs/video_sequence.png" %}'; - var segment_api="{% absurl segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}"; - var LdtPlayer_core='{% absstatic "ldt/metadataplayer/LdtPlayer-core.js" %}'; + var segment_api='{% url segment_api_empty resource_name="segments" api_name="1.0" %}'; var creator_name='{{request.user.username}}'; - $j(document).ready(function(){ init_events(); }); @@ -50,10 +38,10 @@ {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - - - + + + + {% endblock %} @@ -91,8 +79,8 @@
    {% trans 'Player Size : ' %} - x - + x +
    @@ -220,7 +208,7 @@ {% trans 'Show Player' %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,17 +1,17 @@ {% extends "ldt/ldt_utils/workspace_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of creation of content #} {% block js_import %} {{ block.super }} - + {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - + {% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm_popup.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm_popup.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm_popup.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,18 +1,18 @@ {% extends "ldt/ldt_raw_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of creation of content #} {% block js_import %} {{ block.super }} - + {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - + + {% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,10 +1,10 @@ {% extends "ldt/ldt_base.html" %} {% load i18n %} -{% load absstatic %} + {% block js_import %} {{block.super}} - + {% endblock %} {% block js_declaration %} @@ -82,7 +82,7 @@ {% block css_import %} {{block.super}} - + {% endblock %} {% block content %} @@ -91,13 +91,13 @@
    {% trans "My groups" %} {% if can_add_group %} - {% trans 'Create group' %} + {% trans 'Create group' %} {% endif %}
    -
    loader
    +
    loader
    @@ -109,7 +109,7 @@
    {% trans "The group's projects" %}
    -
    loader
    +
    loader
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,4 +1,3 @@ -{% load absstatic %} @@ -7,10 +6,10 @@ Ligne de Temps - IRI - - + + - + - + {% endblock %} @@ -68,7 +68,7 @@ {% block css_import %} {{block.super}} - + {% endblock %} {% block content %} @@ -77,7 +77,7 @@
    {% trans "project list" %}
    -
    +
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/loading.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/loading.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/loading.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,4 +1,3 @@ -{% load absstatic %} @@ -21,7 +20,7 @@
    loading
    + src="{{LDT_MEDIA_PREFIX}}img/loadingAnimation.gif" />
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,6 @@ {% load i18n %} {% load thumbnail %} {% load front_tags %} -{% load absstatic %}
    • {% if tag_cloud|length > 0 %}{% trans 'All categories' %}{% endif %}{% if current_content_tag %}{% if current_content_tag != "" %} > {{current_content_tag}} [x]{% endif %}{% endif %}
    • @@ -26,8 +25,8 @@

  • {% for content in contents %} - - + + diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,12 +1,10 @@ {% spaceless %} {% load i18n %} -{% load absurl %} -{% load absstatic %} {% load thumbnail %}
    - + +
     
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,6 @@ {% load i18n %} -{% load absstatic %} - + diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,6 +1,5 @@ {% load i18n %} {% load thumbnail %} -{% load absstatic %} {% load front_tags %} {% if nb_pj_pages %} @@ -22,33 +21,33 @@ {% if is_gecko %}
    {% else %} {% endif %} - + diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,7 +1,6 @@ {% load i18n %} {% load thumbnail %} {% load front_tags %} -{% load absstatic %} {% if nb_pj_pages %}
      @@ -19,14 +18,14 @@
    {% url ldt.ldt_utils.views.json.project_json_id project.ldt_id as json_url_id %} {% if is_gecko %} - + {% else %} - + {% endif %} - - + + diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,10 +1,10 @@ {% extends "ldt/ldt_base.html" %} {% load i18n %} -{% load absstatic %} + {% block js_import %} {{block.super}} - + {% endblock %} {% block js_declaration %} @@ -43,7 +43,7 @@ {% block css_import %} {{block.super}} - + {% endblock %} {% block content %} @@ -65,9 +65,9 @@
    {% trans "Published projects" %} - {% trans 'Create project' %}
    + {% trans 'Create project' %}
    -
    loader
    +
    loader
    diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,18 +1,18 @@ {% extends "ldt/ldt_utils/workspace_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of creation of content #} {% block js_import %} {{ block.super }} - + {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - + + {% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm_popup.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm_popup.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm_popup.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,18 +1,18 @@ {% extends "ldt/ldt_raw_base.html" %} -{% load absstatic %} + {% load i18n %} {# form of creation of content #} {% block js_import %} {{ block.super }} - + {% endblock %} {% block css_import %} {{ block.super }} {{ content_form.media.css }} - - + + {% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,15 +1,15 @@ {% extends "ldt/ldt_base.html" %} {% load i18n %} -{% load absstatic %} + {% block js_import %} {{ block.super }} - + {% endblock %} {% block css_import %} {{ block.super }} - + {% endblock %} {% block css_import %} - - + + - + {% endblock %} {% block js_declaration %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/templatetags/absstatic.py --- a/src/ldt/ldt/templatetags/absstatic.py Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -from django import template -from django.contrib.staticfiles.storage import staticfiles_storage -from django.contrib.sites.models import Site -from django.template import Library -import logging -import urlparse - -register = template.Library() - -@register.simple_tag -def absstatic(context, path): - try: - request=context['request'] - if request.is_secure(): - domain = "https://%s" % Site.objects.get_current().domain - else: - domain = "http://%s" % Site.objects.get_current().domain - except: - domain = "http://%s" % Site.objects.get_current().domain - - new_path = staticfiles_storage.url(path) - return urlparse.urljoin(domain, new_path) - -absstatic=register.simple_tag(takes_context=True)(absstatic) \ No newline at end of file diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/templatetags/absurl.py --- a/src/ldt/ldt/templatetags/absurl.py Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -import urlparse -from django.template import Library -from django.template.defaulttags import URLNode, url -from django.contrib.sites.models import Site -import logging - - -register = Library() - -class AbsoluteURLNode(URLNode): - def render(self, context): - path = super(AbsoluteURLNode, self).render(context) - try: - request=context['request'] - if request.is_secure(): - domain = "https://%s" % Site.objects.get_current().domain - else: - domain = "http://%s" % Site.objects.get_current().domain - except: - domain = "http://%s" % Site.objects.get_current().domain - return urlparse.urljoin(domain, path) - -@register.simple_tag -def absurl(parser, token, node_cls=AbsoluteURLNode): - """Just like {% url %} but ads the domain of the current site.""" - node_instance = url(parser, token) - return node_cls(view_name=node_instance.view_name, - args=node_instance.args, - kwargs=node_instance.kwargs, - asvar=node_instance.asvar) -absurl = register.tag(absurl) \ No newline at end of file diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/user/templates/ldt/user/user_base.html --- a/src/ldt/ldt/user/templates/ldt/user/user_base.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/user/templates/ldt/user/user_base.html Wed Nov 28 12:31:27 2012 +0100 @@ -2,11 +2,10 @@ {# this page inherit base html, all pages of ldt inherit this page. #} {# all contents are writed in the "iricontent" block #} {% load i18n %} -{% load absstatic %} {% block css_import %} {{ block.super }} - + {% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/user/templates/registration/base.html --- a/src/ldt/ldt/user/templates/registration/base.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/user/templates/registration/base.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,10 +1,9 @@ {% extends "ldt/user/user_base.html" %} -{% load absstatic %} {% block js_import %} {{ block.super }} {% endblock %} {% block css_import %} {{ block.super }} - + {% endblock %} {% block pageclass %}profile{% endblock %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/user/templates/registration/login.html --- a/src/ldt/ldt/user/templates/registration/login.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/user/templates/registration/login.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,6 +1,5 @@ {% extends "registration/base.html" %} {% load i18n %} -{% load absstatic %} {% block js_declaration %}{{ block.super }} -{% endblock %} {% block css_import %} {{ block.super }} {% endblock %} - {% block login %} {% endblock %} @@ -58,7 +40,7 @@
      {% for backend_name in social_list %} -
    •  {{ backend_name }}
    • +
    •  {{ backend_name }}
    • {% endfor %} {% comment %}{{social_list|safe}}{% endcomment %} diff -r 94f9d36371f6 -r c2d9d1c6c228 web/ldtplatform/urls.py --- a/web/ldtplatform/urls.py Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -from django.conf.urls.defaults import patterns, include, url -from django.contrib import admin -from ldt.auth.views import login as pf_login -from ldt.text import VERSION_STR - -#from django.conf import settings - -# Uncomment the next two lines to enable the admin: -admin.autodiscover() - -js_info_dict = { - 'packages': ('django.contrib.admin',), -} - -urlpatterns = patterns('', - # Example: - - # Uncomment the admin/doc line below and add 'django.contrib.admindocs' - # to INSTALLED_APPS to enable admin documentation: - # (r'^admin/doc/', include('django.contrib.admindocs.urls')), - - # Uncomment the next line to enable the admin: - (r'^admin/', include(admin.site.urls)), - (r'^i18n/', include('django.conf.urls.i18n')), - - (r'^ldt/', include('ldt.ldt_utils.urls')), - (r'^user/', include('ldt.user.urls')), - (r'^api/', include('ldt.api.urls')), - (r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')), - - (r'^auth_accounts/', include('registration.backends.simple.urls')), - - #(r'^accounts/', include('socialauth.urls')), - (r'^accounts/', include('social_auth.urls')), - url(r'^accounts/login/$',pf_login,{'template_name': 'registration/login.html'},name='auth_login'), - (r'^oauth/', include('oauth_provider.urls')), - - #(r'^$', 'socialauth.views.signin_complete'), - #(r'^$', 'social_auth.views.complete'), - - (r'^/?$', 'django.views.generic.simple.redirect_to', {'url': 'ldt'}), - #(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), - - (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), -) diff -r 94f9d36371f6 -r c2d9d1c6c228 web/ldtplatform/utils/__init__.py diff -r 94f9d36371f6 -r c2d9d1c6c228 web/log/.keepme diff -r 94f9d36371f6 -r c2d9d1c6c228 web/manage.py --- a/web/manage.py Wed Nov 28 12:27:08 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ldtplatform.settings") - - from django.core.management import execute_from_command_line - - execute_from_command_line(sys.argv) diff -r 94f9d36371f6 -r c2d9d1c6c228 web/static/media/.keepme diff -r 94f9d36371f6 -r c2d9d1c6c228 web/static/media/thumbnails/contents/content_default_icon.png Binary file web/static/media/thumbnails/contents/content_default_icon.png has changed diff -r 94f9d36371f6 -r c2d9d1c6c228 web/static/media/thumbnails/groups/group_default_icon.png Binary file web/static/media/thumbnails/groups/group_default_icon.png has changed diff -r 94f9d36371f6 -r c2d9d1c6c228 web/static/media/thumbnails/projects/project_default_icon.png Binary file web/static/media/thumbnails/projects/project_default_icon.png has changed diff -r 94f9d36371f6 -r c2d9d1c6c228 web/static/media/thumbnails/users/user_default_icon.png Binary file web/static/media/thumbnails/users/user_default_icon.png has changed
    Import
    Import + Import an ldt  
    Reindex + Reindex  
    Compute stats + Compute stats  
    {% trans 'create project' %}
    {% trans 'preview media'%}
    {% trans 'create project' %}
    {% trans 'preview media'%}
    {% thumbnail content.image "50x50" format="PNG" crop="top" as im %}{% endthumbnail %} {{ content.title|default:"_" }}
    {% trans 'copy project' %}
    {% trans 'copy project' %}
    + {% trans 'link json by id' %} {% ifequal project.state 2 %} - {% trans 'Project published, click to unpublish' %} + {% trans 'Project published, click to unpublish' %} {% else %} - {% trans 'Project not published, click to publish' %} + {% trans 'Project not published, click to publish' %} {% endifequal %} {% thumbnail project.image "50x50" crop="center" format="PNG" as im %}{% empty %} {% endthumbnail %}
    {% trans 'open ldt' %}
    {% trans 'open ldt' %}
    {% trans 'open ldt' %}
    {% trans 'open ldt' %}
    {% trans 'copy the project' %}
    {% trans 'link json by id' %}
    {% trans 'copy the project' %}
    {% trans 'link json by id' %}
    - {% trans 'Project published' %} + {% trans 'Project published' %} {% thumbnail project.image "50x50" crop="center" format="PNG" as im %}{% empty %} {% endthumbnail %} diff -r 94f9d36371f6 -r c2d9d1c6c228 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/sharewith.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/sharewith.html Wed Nov 28 12:27:08 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/sharewith.html Wed Nov 28 12:31:27 2012 +0100 @@ -1,12 +1,12 @@ {% load i18n %} -{% load absstatic %} + {% for res in elem_list %}
    {% if res.type == "user" %} - {% trans + {% trans {% else %} - {% + {% {% endif %}