web/ldtplatform/config.py.tmpl
author verrierj
Thu, 02 Feb 2012 14:14:06 +0100
changeset 504 32a878a71a80
parent 444 2711eef17092
child 507 9b3ad1aa1868
permissions -rw-r--r--
Users arrive in front pages by default + bugfixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
444
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 333
diff changeset
     1
# -*- coding: utf-8 -*-
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import os, logging
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
SITE_ID = 1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
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
     7
BASE_URL = '/~ymh/platform/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
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
     9
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
    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
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
    12
STREAM_URL = "rtmp://localhost/vod/media/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
STREAM_SRC_PREFIX = ""
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
 
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    16
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
142
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    17
BASE_STATIC_URL = BASE_URL + 'static/' 
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
# Absolute path to the directory that holds media.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
# 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
    21
MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
    24
# 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
    25
# 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
    26
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
    27
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 112
diff changeset
    28
# 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
    29
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
    30
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
112
9886ab183b09 add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents: 109
diff changeset
    32
CONTENT_ROOT = BASE_STATIC_ROOT + "content/"
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
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
    34
# PATH where uploaded media are put.
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
STREAM_PATH = CONTENT_ROOT
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
142
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    37
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    38
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    39
0b2f32965787 small corrections
ymh <ymh.work@gmail.com>
parents: 122
diff changeset
    40
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
DATABASES = {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    'default': {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
        '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
    45
        'NAME': 'platform',                      # Or path to database file if using sqlite3.
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
        'USER': 'iri',                      # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
        'PASSWORD': 'iri',                  # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
        'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
    }
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
279
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    53
CACHES = {
b50206f6238f Add cache form ObjectPermissionChecker objects
verrierj
parents: 265
diff changeset
    54
    'default': {
283
0970e0f3d02b Fix bug in project deletion + set up dummy cache
verrierj
parents: 281
diff changeset
    55
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
279
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'] 
299
9ce9e92af978 Update icon and templates for read-only projects. Add forbidden stream url.
cavaliet
parents: 283
diff changeset
    94
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
    95
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
    96
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
    97
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_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
    99
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
   100
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
   101
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png"
444
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 333
diff changeset
   102
PROFILE_IMG_MAX_SIZE = 1000000
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 333
diff changeset
   103
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 333
diff changeset
   104
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"]
504
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   105
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   106
SYNTAX = {
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   107
          '++' : 'OK',
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   108
          '--' : 'KO',
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   109
          '==' : 'REF',
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   110
          '??' : 'Q'
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   111
          }
32a878a71a80 Users arrive in front pages by default + bugfixes
verrierj
parents: 444
diff changeset
   112