web/ldtplatform/config.py.tmpl
author verrierj
Thu, 05 Jan 2012 16:00:58 +0100
changeset 333 4ddf8c0eeab4
parent 330 806188af5027
child 444 2711eef17092
permissions -rw-r--r--
Image size is checked before save + project image can be set manually
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': {
283
0970e0f3d02b Fix bug in project deletion + set up dummy cache
verrierj
parents: 281
diff changeset
    54
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
279
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    55
    }
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    56
}
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    57
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
DEBUG = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
TEMPLATE_DEBUG = DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt"))
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
LOG_LEVEL = logging.DEBUG
196
b939a58d13b0 Moved code to add annotation to ldt_utils + added tests
verrierj
parents: 177
diff changeset
    63
logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
INDEX_PATH = os.path.abspath(BASE_DIR + "../index/")
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
ADMINS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
    # ('Your Name', 'your_email@domain.com'),
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
MANAGERS = ADMINS
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
EMAIL_USE_TLS = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
EMAIL_HOST = 'smtp.gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
EMAIL_HOST_USER = 'iri.ddc@gmail.com'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
EMAIL_HOST_PASSWORD = 'ddciripompidou'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
EMAIL_PORT = 587 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
ACCOUNT_ACTIVATION_DAYS = 7
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
REGISTRATION_OPEN = False
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
LDT_MAX_SEARCH_NUMBER = 50
176
a88714473302 Added a page to display search results
verrierj
parents: 142
diff changeset
    84
LDT_MAX_FRAGMENT_PER_SEARCH = 3
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 176
diff changeset
    85
LDT_RESULTS_PER_PAGE = 1
29
d283ffaa7791 activate gzip + default indent to 0
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    86
LDT_JSON_DEFAULT_INDENT = 0
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
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
    89
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
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
    91
265
491d057cbfd2 Fix bug when selecting media in content creation window
verrierj
parents: 247
diff changeset
    92
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] 
299
9ce9e92af978 Update icon and templates for read-only projects. Add forbidden stream url.
cavaliet
parents: 283
diff changeset
    93
FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
247
f98f1a6e15f1 Add a group to contain published projects
verrierj
parents: 243
diff changeset
    94
PUBLIC_GROUP_NAME = 'everyone'
330
806188af5027 Projects have an icon identical to one of the media they contain, if this icon is different from the default icon. Icons can be set using ./manage.py setprojecticon once icons have been added to contents.
verrierj
parents: 299
diff changeset
    95
MAX_USERS_SEARCH = 20
806188af5027 Projects have an icon identical to one of the media they contain, if this icon is different from the default icon. Icons can be set using ./manage.py setprojecticon once icons have been added to contents.
verrierj
parents: 299
diff changeset
    96
806188af5027 Projects have an icon identical to one of the media they contain, if this icon is different from the default icon. Icons can be set using ./manage.py setprojecticon once icons have been added to contents.
verrierj
parents: 299
diff changeset
    97
DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png"
806188af5027 Projects have an icon identical to one of the media they contain, if this icon is different from the default icon. Icons can be set using ./manage.py setprojecticon once icons have been added to contents.
verrierj
parents: 299
diff changeset
    98
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png"
806188af5027 Projects have an icon identical to one of the media they contain, if this icon is different from the default icon. Icons can be set using ./manage.py setprojecticon once icons have been added to contents.
verrierj
parents: 299
diff changeset
    99
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png"
333
4ddf8c0eeab4 Image size is checked before save + project image can be set manually
verrierj
parents: 330
diff changeset
   100
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png"
4ddf8c0eeab4 Image size is checked before save + project image can be set manually
verrierj
parents: 330
diff changeset
   101
PROFILE_IMG_MAX_SIZE = 1000000