web/ldtplatform/config.py.tmpl
changeset 104 b62a2a3e272d
parent 103 5578dcb54f4d
child 106 2affc8a44dfb
equal deleted inserted replaced
103:5578dcb54f4d 104:b62a2a3e272d
     3 SITE_ID = 1
     3 SITE_ID = 1
     4 
     4 
     5 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
     5 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
     6 BASE_URL = '/~ymh/platform/'
     6 BASE_URL = '/~ymh/platform/'
     7 WEB_URL = 'http://localhost/'
     7 WEB_URL = 'http://localhost/'
     8 MEDIA_BASE_URL = BASE_URL + 'static/'
     8 STATIC_URL = BASE_URL + 'static/'
     9 STREAM_URL = MEDIA_BASE_URL + "/content/"
     9 STREAM_URL = MEDIA_BASE_URL + "/content/"
    10 
    10 
    11 STREAM_SRC_PREFIX = ""
    11 STREAM_SRC_PREFIX = ""
    12  
    12  
    13 
    13 
    14 # Absolute path to the directory that holds media.
    14 # Absolute path to the directory that holds media.
    15 # Example: "/home/media/media.lawrence.com/"
    15 # Example: "/home/media/media.lawrence.com/"
    16 MEDIA_ROOT = os.path.abspath(BASE_DIR + "../static/")
    16 MEDIA_ROOT = os.path.abspath(BASE_DIR + "../static/")
    17 
    17 
    18 
    18 
       
    19 # Absolute path to the directory that static files (js, css, swf...)
       
    20 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
       
    21 STATIC_ROOT = "C:/user/myfolder/my_platform/platform/web/static"
       
    22 
    19 
    23 
    20 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    24 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    21 # trailing slash if there is a path component (optional in other cases).
    25 # trailing slash if there is a path component (optional in other cases).
    22 # Examples: "http://media.lawrence.com", "http://example.com/media/"
    26 # Examples: "http://media.lawrence.com", "http://example.com/media/"
    23 MEDIA_URL = MEDIA_BASE_URL
    27 MEDIA_URL = STATIC_URL
    24 
    28 
    25 CONTENT_ROOT = MEDIA_ROOT + "media/content/"
    29 CONTENT_ROOT = MEDIA_ROOT + "media/content/"
    26 
    30 
    27 STREAM_PATH = CONTENT_ROOT
    31 STREAM_PATH = CONTENT_ROOT
    28 
    32 
    29 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    33 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    30 # trailing slash.
    34 # trailing slash.
    31 # Examples: "http://foo.com/media/", "/media/".
    35 # Examples: "http://foo.com/media/", "/media/".
    32 ADMIN_MEDIA_PREFIX = MEDIA_URL + 'admin/'
    36 ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
    33 LDT_MEDIA_PREFIX = MEDIA_URL + 'ldt/'
    37 LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
    34 
    38 
    35 DATABASES = {
    39 DATABASES = {
    36     'default': {
    40     'default': {
    37         'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
    41         'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
    38         'NAME': 'platform',                      # Or path to database file if using sqlite3.
    42         'NAME': 'platform',                      # Or path to database file if using sqlite3.