web/ldtplatform/config.py.tmpl
changeset 769 a49769a3088d
parent 740 d03908cf3c73
child 858 dcf47b385ddd
--- a/web/ldtplatform/config.py.tmpl	Thu Aug 30 15:29:09 2012 +0200
+++ b/web/ldtplatform/config.py.tmpl	Fri Aug 31 15:50:15 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"]