web/ldtplatform/config.py.tmpl
author cavaliet
Wed, 11 May 2011 16:19:46 +0200
changeset 104 b62a2a3e272d
parent 103 5578dcb54f4d
child 106 2affc8a44dfb
permissions -rw-r--r--
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder. DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import os, logging
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
SITE_ID = 1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
3
03918bc7b9f1 small corrections on install
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
     6
BASE_URL = '/~ymh/platform/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
WEB_URL = 'http://localhost/'
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
     8
STATIC_URL = BASE_URL + 'static/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
STREAM_URL = MEDIA_BASE_URL + "/content/"
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
STREAM_SRC_PREFIX = ""
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
# Absolute path to the directory that holds media.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
# Example: "/home/media/media.lawrence.com/"
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
MEDIA_ROOT = os.path.abspath(BASE_DIR + "../static/")
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    19
# Absolute path to the directory that static files (js, css, swf...)
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    20
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    21
STATIC_ROOT = "C:/user/myfolder/my_platform/platform/web/static"
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    22
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
# trailing slash if there is a path component (optional in other cases).
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
# Examples: "http://media.lawrence.com", "http://example.com/media/"
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    27
MEDIA_URL = STATIC_URL
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
CONTENT_ROOT = MEDIA_ROOT + "media/content/"
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
STREAM_PATH = CONTENT_ROOT
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
# trailing slash.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
# Examples: "http://foo.com/media/", "/media/".
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    36
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    37
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
DATABASES = {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    'default': {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
3
03918bc7b9f1 small corrections on install
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
    42
        'NAME': 'platform',                      # Or path to database file if using sqlite3.
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
        'USER': 'iri',                      # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
        'PASSWORD': 'iri',                  # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
        'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
    }
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
DEBUG = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
TEMPLATE_DEBUG = DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
LOG_LEVEL = logging.DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
ADMINS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
    # ('Your Name', 'your_email@domain.com'),
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
MANAGERS = ADMINS
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
EMAIL_USE_TLS = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
EMAIL_HOST = 'smtp.gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
EMAIL_HOST_USER = 'iri.ddc@gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
EMAIL_HOST_PASSWORD = 'ddciripompidou'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
EMAIL_PORT = 587 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
ACCOUNT_ACTIVATION_DAYS = 7
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
REGISTRATION_OPEN = False
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
LDT_MAX_SEARCH_NUMBER = 50
29
d283ffaa7791 activate gzip + default indent to 0
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    75
LDT_JSON_DEFAULT_INDENT = 0
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
EMPTY_MEDIA_EXTERNALID = None
103
5578dcb54f4d merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents: 29
diff changeset
    78
5578dcb54f4d merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents: 29
diff changeset
    79
AUTO_INDEX_AFTER_SAVE = True
5578dcb54f4d merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents: 29
diff changeset
    80