web/ldtplatform/config.py.tmpl
changeset 9 fc82129bcae4
parent 8 ffdbee7b92ed
child 10 d7b002d618fb
equal deleted inserted replaced
8:ffdbee7b92ed 9:fc82129bcae4
     1 import os, logging
       
     2 
       
     3 SITE_ID = 1
       
     4 
       
     5 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
       
     6 BASE_URL = '/~ymh/platform/'
       
     7 WEB_URL = 'http://localhost/'
       
     8 
       
     9 STREAM_SRC_PREFIX = ""
       
    10  
       
    11 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
       
    12 BASE_STATIC_URL = BASE_URL + 'static/' 
       
    13 
       
    14 STREAM_URL = BASE_STATIC_URL + "/content/"
       
    15 
       
    16 
       
    17 # Absolute path to the directory that holds media.
       
    18 # Example: "/home/media/media.lawrence.com/"
       
    19 MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
       
    20 
       
    21 STATIC_URL = BASE_STATIC_URL + 'site/'
       
    22 # Absolute path to the directory that static files (js, css, swf...)
       
    23 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
       
    24 STATIC_ROOT = BASE_STATIC_ROOT + "site/"
       
    25 
       
    26 # PATH to the ffmpeg executable, used to know automatically the media file duration 
       
    27 FFMPEG_PATH = "C:/path/to/ffmpeg.exe"
       
    28 
       
    29 
       
    30 CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
       
    31 
       
    32 # PATH where uploaded media are put.
       
    33 STREAM_PATH = CONTENT_ROOT
       
    34 
       
    35 ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
       
    36 LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
       
    37 
       
    38 
       
    39 DATABASES = {
       
    40     'default': {
       
    41         'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
       
    42         'NAME': 'regardssignes_hg',                      # Or path to database file if using sqlite3.
       
    43         'USER': 'iri',                      # Not used with sqlite3.
       
    44         'PASSWORD': 'iri',                  # Not used with sqlite3.
       
    45         'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
       
    46         'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
       
    47     }
       
    48 }
       
    49 
       
    50 DEBUG = True
       
    51 TEMPLATE_DEBUG = DEBUG
       
    52 
       
    53 LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
       
    54 LOG_LEVEL = logging.DEBUG
       
    55 
       
    56 INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
       
    57 
       
    58 
       
    59 ADMINS = (
       
    60     # ('Your Name', 'your_email@domain.com'),
       
    61 )
       
    62 
       
    63 MANAGERS = ADMINS
       
    64 
       
    65 EMAIL_USE_TLS = True
       
    66 EMAIL_HOST = 'smtp.gmail.com'
       
    67 EMAIL_HOST_USER = 'iri.ddc@gmail.com'
       
    68 EMAIL_HOST_PASSWORD = 'ddciripompidou'
       
    69 EMAIL_PORT = 587 
       
    70 
       
    71 ACCOUNT_ACTIVATION_DAYS = 7
       
    72 REGISTRATION_OPEN = False
       
    73 
       
    74 LDT_MAX_SEARCH_NUMBER = 50
       
    75 LDT_MAX_FRAGMENT_PER_SEARCH = 3
       
    76 LDT_RESULTS_PER_PAGE = 1
       
    77 LDT_JSON_DEFAULT_INDENT = 0
       
    78 
       
    79 EMPTY_MEDIA_EXTERNALID = None
       
    80 
       
    81 AUTO_INDEX_AFTER_SAVE = True