--- a/.hgignore Thu Aug 30 01:15:16 2012 +0200
+++ b/.hgignore Thu Aug 30 14:11:41 2012 +0200
@@ -1,7 +1,6 @@
syntax: regexp
^\.project$
-syntax: regexp
^web/index$
^web/log$
.*\.pyc$
@@ -11,17 +10,14 @@
^web/static/site$
^virtualenv/web/env$
.pydevproject
-
-
-syntax: regexp
^virtualenv/web/project-boot\.py$
-syntax: regexp
^web/theend/\.htaccess$
+^web/theend/config\.py$
+^\.settings/org\.eclipse\.core\.resources\.prefs$
+^\.settings/org\.eclipse\.core\.resources\.prefs$
+^\.settings/org\.eclipse\.core\.runtime\.prefs$
+^virtualenv/sync/env/
syntax: regexp
-^web/theend/config\.py$
-syntax: regexp
-^\.settings/org\.eclipse\.core\.resources\.prefs$
+^sbin/sync/config\.py$
syntax: regexp
-^\.settings/org\.eclipse\.core\.resources\.prefs$
-syntax: regexp
-^\.settings/org\.eclipse\.core\.runtime\.prefs$
\ No newline at end of file
+^virtualenv/sync/project-boot\.py$
\ No newline at end of file
--- a/sbin/sync/config.py.tmpl Thu Aug 30 01:15:16 2012 +0200
+++ b/sbin/sync/config.py.tmpl Thu Aug 30 14:11:41 2012 +0200
@@ -3,7 +3,7 @@
env.hosts = ['<user>@<server1>']
env.web_group = '<web_user_group>'
-env.folders = ['index', 'log', 'static/media']
+env.folders = ['log', 'static/media']
env.base_export_path = "<local path used to export hg version>"
env.export_prefix = "theend"
@@ -46,7 +46,6 @@
env.db_port = <database port>
env.log_file = env.remote_web_path + '/log/log.txt'
-env.index_path = env.remote_web_path + '/index/'
env.google_analytics_code = ""
@@ -56,3 +55,5 @@
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="
+
--- a/sbin/sync/fabfile.py Thu Aug 30 01:15:16 2012 +0200
+++ b/sbin/sync/fabfile.py Thu Aug 30 14:11:41 2012 +0200
@@ -12,7 +12,7 @@
import config
def get_export_path(version):
- base_path = os.path.join(env.base_export_path,env.export_prefix).lstrip("/")
+ 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):
@@ -31,7 +31,7 @@
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 --tmpdir ldtplatform.XXXXXX")
+ 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)),
@@ -89,13 +89,13 @@
'db_host': env.db_host,
'db_port': env.db_port,
'log_file': env.log_file,
- 'index_path': env.index_path,
'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):
@@ -147,9 +147,9 @@
@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)
- check_folder_access()
sudo(env.web_relaunch_cmd, shell=False)
@task
--- a/web/theend/config.py.tmpl Thu Aug 30 01:15:16 2012 +0200
+++ b/web/theend/config.py.tmpl Thu Aug 30 14:11:41 2012 +0200
@@ -3,15 +3,16 @@
SITE_ID = 1
-BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
-BASE_URL = '/~ymh/platform/'
-WEB_URL = 'http://localhost/'
+#BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
+BASE_DIR = '%(base_dir)s'
+BASE_URL = '%(base_url)s'
+WEB_URL = '%(web_url)s'
STATIC_URL = BASE_URL + 'static/site/'
-STREAM_URL = "rtmp://localhost/vod/media/"
+STREAM_URL = "%(stream_url)s"
-STREAM_SRC_PREFIX = ""
+STREAM_SRC_PREFIX = "%(stream_src_prefix)s"
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
BASE_STATIC_URL = BASE_URL + 'static/'
@@ -26,7 +27,7 @@
STATIC_ROOT = BASE_STATIC_ROOT + "site/"
# PATH to the ffmpeg executable, used to know automatically the media file duration
-FFMPEG_PATH = "C:/path/to/ffmpeg.exe"
+FFMPEG_PATH = "%(ffmpeg_path)s"
CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
@@ -41,12 +42,12 @@
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'platform', # Or path to database file if using sqlite3.
- 'USER': 'iri', # Not used with sqlite3.
- 'PASSWORD': 'iri', # Not used with sqlite3.
- 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '5432', # Set to empty string for default. Not used with sqlite3.
+ 'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': '%(db_name)s', # Or path to database file if using sqlite3.
+ 'USER': '%(db_user)s', # Not used with sqlite3.
+ 'PASSWORD': '%(db_password)s', # Not used with sqlite3.
+ 'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3.
}
}
@@ -59,12 +60,11 @@
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
+#LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
+LOG_FILE = '%(log_file)s'
LOG_LEVEL = logging.DEBUG
logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)
-INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
-
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
@@ -72,13 +72,13 @@
MANAGERS = ADMINS
-#GOOGLE_ANALYTICS_CODE = 'UA-1234-1'
+GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s'
-EMAIL_USE_TLS = True
-EMAIL_HOST = 'smtp.gmail.com'
-EMAIL_HOST_USER = 'iri.ddc@gmail.com'
-EMAIL_HOST_PASSWORD = 'ddciripompidou'
-EMAIL_PORT = 587
+EMAIL_USE_TLS = %(email_use_tls)s
+EMAIL_HOST = '%(email_host)s'
+EMAIL_HOST_USER = '%(email_host_user)s'
+EMAIL_HOST_PASSWORD = '%(email_host_user)s'
+EMAIL_PORT = %(email_port)d
ACCOUNT_ACTIVATION_DAYS = 7
REGISTRATION_OPEN = False
@@ -95,7 +95,7 @@
AUTO_INDEX_AFTER_SAVE = True
-FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
+FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s"
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"]