web/ldtplatform/config.py.tmpl
author verrierj
Mon, 12 Dec 2011 15:57:35 +0100
changeset 279 b50206f6238f
parent 265 491d057cbfd2
child 281 832c5049b358
permissions -rw-r--r--
Add cache form ObjectPermissionChecker objects
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/'
106
2affc8a44dfb Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents: 104
diff changeset
     8
STATIC_URL = BASE_URL + 'static/site/'
2affc8a44dfb Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents: 104
diff changeset
     9
2affc8a44dfb Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents: 104
diff changeset
    10
2affc8a44dfb Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents: 104
diff changeset
    11
STREAM_URL = "rtmp://localhost/vod/media/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
STREAM_SRC_PREFIX = ""
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
 
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    15
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
142
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    16
BASE_STATIC_URL = BASE_URL + 'static/' 
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
# Absolute path to the directory that holds media.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
# Example: "/home/media/media.lawrence.com/"
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    20
MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    23
# 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
    24
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    25
STATIC_ROOT = BASE_STATIC_ROOT + "site/"
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    26
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 112
diff changeset
    27
# PATH to the ffmpeg executable, used to know automatically the media file duration 
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 112
diff changeset
    28
FFMPEG_PATH = "C:/path/to/ffmpeg.exe"
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 112
diff changeset
    29
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    31
CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
106
2affc8a44dfb Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents: 104
diff changeset
    33
# PATH where uploaded media are put.
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
STREAM_PATH = CONTENT_ROOT
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
142
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    36
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    37
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    38
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    39
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
DATABASES = {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    'default': {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
        '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
    44
        'NAME': 'platform',                      # Or path to database file if using sqlite3.
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
        'USER': 'iri',                      # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
        'PASSWORD': 'iri',                  # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
        'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
    }
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
279
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    52
CACHES = {
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    53
    'default': {
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    54
        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    55
        'LOCATION': 'cache',
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    56
    }
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    57
}
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    58
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
DEBUG = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
TEMPLATE_DEBUG = DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
LOG_LEVEL = logging.DEBUG
196
b939a58d13b0 Moved code to add annotation to ldt_utils + added tests
verrierj
parents: 177
diff changeset
    64
logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
ADMINS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
    # ('Your Name', 'your_email@domain.com'),
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
MANAGERS = ADMINS
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
EMAIL_USE_TLS = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
EMAIL_HOST = 'smtp.gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
EMAIL_HOST_USER = 'iri.ddc@gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
EMAIL_HOST_PASSWORD = 'ddciripompidou'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
EMAIL_PORT = 587 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
ACCOUNT_ACTIVATION_DAYS = 7
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
REGISTRATION_OPEN = False
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
LDT_MAX_SEARCH_NUMBER = 50
176
a88714473302 Added a page to display search results
verrierj
parents: 142
diff changeset
    85
LDT_MAX_FRAGMENT_PER_SEARCH = 3
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 176
diff changeset
    86
LDT_RESULTS_PER_PAGE = 1
29
d283ffaa7791 activate gzip + default indent to 0
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    87
LDT_JSON_DEFAULT_INDENT = 0
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
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
    90
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
    91
AUTO_INDEX_AFTER_SAVE = True
243
3cff86180fbe Replaced calls to objects by calls to safe_objects in views + xml can be changed on the fly to hide a content
verrierj
parents: 196
diff changeset
    92
265
491d057cbfd2 Fix bug when selecting media in content creation window
verrierj
parents: 247
diff changeset
    93
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] 
247
f98f1a6e15f1 Add a group to contain published projects
verrierj
parents: 243
diff changeset
    94
FORBIDDEN_STREAM_URL = "empty-video"
f98f1a6e15f1 Add a group to contain published projects
verrierj
parents: 243
diff changeset
    95
PUBLIC_GROUP_NAME = 'everyone'