web/ldtplatform/config.py.tmpl
changeset 769 a49769a3088d
parent 740 d03908cf3c73
child 858 dcf47b385ddd
equal deleted inserted replaced
768:85012ba55b83 769:a49769a3088d
     1 # -*- coding: utf-8 -*-
     1 # -*- coding: utf-8 -*-
     2 import os, logging
     2 import os, logging
     3 
     3 
     4 SITE_ID = 1
     4 SITE_ID = 1
     5 
     5 
     6 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
     6 #BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
     7 BASE_URL = '/~ymh/platform/'
     7 BASE_DIR = '%(base_dir)s'
     8 WEB_URL = 'http://localhost/'
     8 BASE_URL = '%(base_url)s'
       
     9 WEB_URL = '%(web_url)s'
     9 STATIC_URL = BASE_URL + 'static/site/'
    10 STATIC_URL = BASE_URL + 'static/site/'
    10 
    11 
    11 
    12 
    12 STREAM_URL = "rtmp://localhost/vod/media/"
    13 STREAM_URL = "%(stream_url)s"
    13 
    14 
    14 STREAM_SRC_PREFIX = ""
    15 STREAM_SRC_PREFIX = "%(stream_src_prefix)s"
    15  
    16  
    16 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
    17 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
    17 BASE_STATIC_URL = BASE_URL + 'static/' 
    18 BASE_STATIC_URL = BASE_URL + 'static/' 
    18 
    19 
    19 # Absolute path to the directory that holds media.
    20 # Absolute path to the directory that holds media.
    24 # Absolute path to the directory that static files (js, css, swf...)
    25 # Absolute path to the directory that static files (js, css, swf...)
    25 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
    26 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
    26 STATIC_ROOT = BASE_STATIC_ROOT + "site/"
    27 STATIC_ROOT = BASE_STATIC_ROOT + "site/"
    27 
    28 
    28 # PATH to the ffmpeg executable, used to know automatically the media file duration 
    29 # PATH to the ffmpeg executable, used to know automatically the media file duration 
    29 FFMPEG_PATH = "C:/path/to/ffmpeg.exe"
    30 FFMPEG_PATH = "%(ffmpeg_path)s"
    30 
    31 
    31 
    32 
    32 CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
    33 CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
    33 
    34 
    34 # PATH where uploaded media are put.
    35 # PATH where uploaded media are put.
    39 
    40 
    40 
    41 
    41 
    42 
    42 DATABASES = {
    43 DATABASES = {
    43     'default': {
    44     'default': {
    44         'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
    45         'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
    45         'NAME': 'platform',                      # Or path to database file if using sqlite3.
    46         'NAME': '%(db_name)s',                      # Or path to database file if using sqlite3.
    46         'USER': 'iri',                      # Not used with sqlite3.
    47         'USER': '%(db_user)s',                      # Not used with sqlite3.
    47         'PASSWORD': 'iri',                  # Not used with sqlite3.
    48         'PASSWORD': '%(db_password)s',                  # Not used with sqlite3.
    48         'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
    49         'HOST': '%(db_host)s',                      # Set to empty string for localhost. Not used with sqlite3.
    49         'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
    50         'PORT': '%(db_port)d',                      # Set to empty string for default. Not used with sqlite3.
    50     }
    51     }
    51 }
    52 }
    52 
    53 
    53 CACHES = {
    54 CACHES = {
    54     'default': {
    55     'default': {
    57 }
    58 }
    58 
    59 
    59 DEBUG = True
    60 DEBUG = True
    60 TEMPLATE_DEBUG = DEBUG
    61 TEMPLATE_DEBUG = DEBUG
    61 
    62 
    62 LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
    63 #LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
       
    64 LOG_FILE = '%(log_file)s'
    63 LOG_LEVEL = logging.DEBUG
    65 LOG_LEVEL = logging.DEBUG
    64 logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)
    66 logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)
    65 
       
    66 INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
       
    67 
    67 
    68 
    68 
    69 ADMINS = (
    69 ADMINS = (
    70     # ('Your Name', 'your_email@domain.com'),
    70     # ('Your Name', 'your_email@domain.com'),
    71 )
    71 )
    72 
    72 
    73 MANAGERS = ADMINS
    73 MANAGERS = ADMINS
    74 
    74 
    75 #GOOGLE_ANALYTICS_CODE = 'UA-1234-1'
    75 GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s'
    76 
    76 
    77 EMAIL_USE_TLS = True
    77 EMAIL_USE_TLS = %(email_use_tls)s
    78 EMAIL_HOST = 'smtp.gmail.com'
    78 EMAIL_HOST = '%(email_host)s'
    79 EMAIL_HOST_USER = 'iri.ddc@gmail.com'
    79 EMAIL_HOST_USER = '%(email_host_user)s'
    80 EMAIL_HOST_PASSWORD = 'ddciripompidou'
    80 EMAIL_HOST_PASSWORD = '%(email_host_user)s'
    81 EMAIL_PORT = 587 
    81 EMAIL_PORT = %(email_port)d 
    82 
    82 
    83 ACCOUNT_ACTIVATION_DAYS = 7
    83 ACCOUNT_ACTIVATION_DAYS = 7
    84 REGISTRATION_OPEN = False
    84 REGISTRATION_OPEN = False
    85 
    85 
    86 LDT_MAX_SEARCH_NUMBER = 50
    86 LDT_MAX_SEARCH_NUMBER = 50
    93 
    93 
    94 EMPTY_MEDIA_EXTERNALID = None
    94 EMPTY_MEDIA_EXTERNALID = None
    95 
    95 
    96 AUTO_INDEX_AFTER_SAVE = True
    96 AUTO_INDEX_AFTER_SAVE = True
    97 
    97 
    98 FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
    98 FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s"
    99 
    99 
   100 FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"]
   100 FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"]
   101 
   101 
   102 HAYSTACK_CONNECTIONS = {
   102 HAYSTACK_CONNECTIONS = {
   103     'default': {
   103     'default': {