src/ldtplatform/settings.py
author ymh <ymh.work@gmail.com>
Wed, 16 Sep 2015 22:36:47 +0200
changeset 280 b61b766a5830
parent 258 993f18158ccb
permissions -rw-r--r--
Remove unnecessary migration
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# -*- coding: utf-8 -*-
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
#@PydevCodeAnalysisIgnore
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
import os.path
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
import ldtplatform
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
# Django settings for project.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
DEBUG = True
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
TEMPLATE_DEBUG = DEBUG
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
ADMINS = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    # ('Your Name', 'your_email@domain.com'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
MANAGERS = ADMINS
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
DATABASES = {
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    'default': {
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
        'NAME': '',                      # Or path to database file if using sqlite3.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        'USER': '',                      # Not used with sqlite3.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        'PASSWORD': '',                  # Not used with sqlite3.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    }
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
}
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
# Local time zone for this installation. Choices can be found here:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
# although not all choices may be available on all operating systems.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
# If running in a Windows environment this must be set to the same as your
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
# system time zone.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
TIME_ZONE = 'UTC'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
# Language code for this installation. All choices can be found here:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
# http://www.i18nguy.com/unicode/language-identifiers.html
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
LANGUAGE_CODE = 'fr-fr'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
ugettext = lambda s: s
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
LANGUAGES = ( 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    ('fr', ugettext('French')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    ('en', ugettext('English')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    ('ja', ugettext('Japanese')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
SITE_ID = 1
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
# If you set this to False, Django will make some optimizations so as not
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
# to load the internationalization machinery.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
USE_I18N = True
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
# Absolute path to the directory that holds media.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
# Example: "/home/media/media.lawrence.com/"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
#MEDIA_ROOT = ''
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
# Root of static files used by each app, generated by code or uploaded by users
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
#STATIC_URL = '/static/'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
# trailing slash if there is a path component (optional in other cases).
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
# Examples: "http://media.lawrence.com", "http://example.com/media/"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
#MEDIA_URL = ''
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
# trailing slash.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
# Examples: "http://foo.com/media/", "/media/".
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
# Make this unique, and don't share it with anybody.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
# List of callables that know how to import templates from various sources.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
TEMPLATE_LOADERS = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
    'django.template.loaders.filesystem.Loader',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
    'django.template.loaders.app_directories.Loader',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
#     'django.template.loaders.eggs.Loader',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
MIDDLEWARE_CLASSES = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
    'django.middleware.cache.UpdateCacheMiddleware',
223
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
    82
    'corsheaders.middleware.CorsMiddleware',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
    'django.middleware.common.CommonMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
    'django.middleware.cache.FetchFromCacheMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
    'django.middleware.gzip.GZipMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
    'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
    'django.contrib.sessions.middleware.SessionMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
    'django.middleware.csrf.CsrfViewMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
    'django.contrib.auth.middleware.AuthenticationMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
    #'django.middleware.locale.LocaleMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
    'django.contrib.messages.middleware.MessageMiddleware',
239
6888d282b4cc started upgrading to Django 1.6: switched social-auth to python-social-auth
durandn
parents: 223
diff changeset
    92
    #'django_openid_consumer.middleware.OpenIDMiddleware',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
    'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
    'ldt.security.middleware.SecurityMiddleware',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
TEMPLATE_CONTEXT_PROCESSORS = ( 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
    "django.core.context_processors.request",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
    "django.contrib.auth.context_processors.auth",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
    "django.core.context_processors.debug",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
    "django.core.context_processors.i18n",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
    "django.core.context_processors.media",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
    "django.core.context_processors.static",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
    "ldt.utils.context_processors.ldt_context",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
ROOT_URLCONF = 'ldtplatform.urls'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
TEMPLATE_DIRS = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
    # Always use forward slashes, even on Windows.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
    # Don't forget to use absolute paths, not relative paths.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
    os.path.join(os.path.basename(__file__), 'templates'), 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
    os.path.join(os.path.dirname(__file__), 'templates'),  
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
FIXTURES_DIRS = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
    os.path.join(os.path.basename(__file__), 'fixtures'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
INSTALLED_APPS = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
    'django_extensions',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
    'django.contrib.auth',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
    'django.contrib.contenttypes',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
    'django.contrib.sessions',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
    'django.contrib.sites',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
    'django.contrib.messages',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
    'django.contrib.admin',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
    'django.contrib.staticfiles',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
    'haystack',
223
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   132
    'corsheaders',
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   133
    'tastypie',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   134
    'guardian',
171
e809ae17472a V.2.12 : requires ldt v1.53, remove tagging, add taggit
cavaliet
parents: 159
diff changeset
   135
    'taggit',
e809ae17472a V.2.12 : requires ldt v1.53, remove tagging, add taggit
cavaliet
parents: 159
diff changeset
   136
    'taggit_templatetags',
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   137
    'registration',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
    'oauth_provider',
239
6888d282b4cc started upgrading to Django 1.6: switched social-auth to python-social-auth
durandn
parents: 223
diff changeset
   139
    #'django_openid_consumer',
6888d282b4cc started upgrading to Django 1.6: switched social-auth to python-social-auth
durandn
parents: 223
diff changeset
   140
    'social.apps.django_app.default',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
    'sorl.thumbnail',
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   142
    'ldt',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   143
    'ldt.core',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   144
    'ldt.security',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   145
    'ldt.user',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   146
    'ldt.ldt_utils',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   147
    'ldt.text',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   148
    'ldt.management',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   149
    'ldt.indexation',
103
bcb4f7c71799 - Reactivate hashcut
ymh <ymh.work@gmail.com>
parents: 102
diff changeset
   150
    'hashcut',
58
80317ff7192b add chunked_uplaods to installed_app
rougeronj
parents: 21
diff changeset
   151
    'chunked_uploads',
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   152
    'ldtplatform',
110
7da60a0dd2bb update requirements (ldt, hashcut and metadatacomposer) and version number to 2.10
cavaliet
parents: 109
diff changeset
   153
    'metadatacomposer',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
242
58f0aa825c8a Django 1.8 upgrade: adding manual migration for Django registration
durandn
parents: 241
diff changeset
   156
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   157
#AUTH_PROFILE_MODULE = 'user.UserProfile'
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   158
AUTH_USER_MODEL = 'user.LdtUser'
242
58f0aa825c8a Django 1.8 upgrade: adding manual migration for Django registration
durandn
parents: 241
diff changeset
   159
#INITIAL_CUSTOM_USER_MIGRATION = "0009_rename_auth_user_to_user_ldt_user"
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
DECOUPAGE_BLACKLIST = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
     "de_PPP",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
ZIP_BLACKLIST = (
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
     "__MACOSX",
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
)
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
AUTHENTICATION_BACKENDS = (
239
6888d282b4cc started upgrading to Django 1.6: switched social-auth to python-social-auth
durandn
parents: 223
diff changeset
   170
    'guardian.backends.ObjectPermissionBackend',
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
    'django.contrib.auth.backends.ModelBackend',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
)
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   173
#SOCIAL_AUTH_IMPORT_BACKENDS = (
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   174
#    'myproy.social_auth_extra_services',
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   175
#)
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
ACCOUNT_ACTIVATION_DAYS = 7 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
LDT_MAX_SEARCH_NUMBER = 50
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
LDT_JSON_DEFAULT_INDENT = 0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
LDT_MAX_FRAGMENT_PER_SEARCH = 3
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
LDT_RESULTS_PER_PAGE = 10
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
LDT_MAX_CONTENTS_PER_PAGE = 10
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
LDT_MAX_PROJECTS_PER_PAGE = 10
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
LDT_FRONT_MEDIA_PER_PAGE = 9
81
8a667bb50299 add migration and update version number and requirements
cavaliet
parents: 21
diff changeset
   186
LDT_FRONT_PROJECTS_PER_PAGE = 12
159
662f8f9676f6 v2.11.17 : require ldt 1.52
cavaliet
parents: 110
diff changeset
   187
LDT_MEDIA_IN_RESULTS_PAGE = 6
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
OAUTH_PROVIDER_KEY_SIZE = 32
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
OAUTH_PROVIDER_SECRET_SIZE = 32
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
OAUTH_PROVIDER_VERIFIER_SIZE = 10
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
AUTO_INDEX_AFTER_SAVE = True
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   202
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
ANONYMOUS_USER_ID = -1
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   204
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
WEB_VERSION = ldtplatform.get_version()
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
DIVISIONS_FOR_STAT_ANNOTATION = 64
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
FRONT_TAG_LIST = []
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   210
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   211
DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   213
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   214
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png"
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   215
PROFILE_IMG_MAX_SIZE = 1000000
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   216
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media']
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   218
FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
PUBLIC_GROUP_NAME = 'everyone'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
MAX_USERS_SEARCH = 20
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   221
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
SYNTAX = {
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   223
          '++' : 'OK',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   224
          '--' : 'KO',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
          '==' : 'REF',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   226
          '??' : 'Q'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
          }
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
EXTERNAL_STREAM_SRC = ['youtube.com', 'dailymotion.com', 'vimeo.com']
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
HAYSTACK_CONNECTIONS = {
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
    'default': {
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
        'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
    },
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
}
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   236
HAYSTACK_SIGNAL_PROCESSOR = 'ldt.indexation.signals.LdtSignalProcessor'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
223
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   238
#Cors headers for API
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   239
CORS_ORIGIN_ALLOW_ALL = True
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   240
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
from config import *
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   243
if not "SRC_BASE_URL" in locals():
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   244
    SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' 
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   245
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
if not "LOGIN_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   247
    LOGIN_URL = SRC_BASE_URL + 'accounts/login/'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
if not "LOGOUT_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   249
    LOGOUT_URL = SRC_BASE_URL + 'accounts/disconnect/'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
if not "LOGIN_REDIRECT_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   251
    LOGIN_REDIRECT_URL = SRC_BASE_URL + 'ldt/'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
if not "LOGOUT_REDIRECT_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   253
    LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'accounts/login'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
if not "PROFILE_REDIRECT_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   255
    PROFILE_REDIRECT_URL = SRC_BASE_URL + 'auth_accounts/create/profile'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
if not "LOGIN_ERROR_URL" in locals():
59
4671c9fd69b5 - update virtualenv
ymh <ymh.work@gmail.com>
parents: 58
diff changeset
   258
    LOGIN_ERROR_URL = SRC_BASE_URL + 'accounts/login'
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
# URL that handles the media served from MEDIA_ROOT.
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
if not "MEDIA_URL" in locals():
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
    MEDIA_URL = BASE_URL + 'static/media/'
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
223
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   264
if not "CORS_URLS_REGEX" in locals():
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   265
    CORS_URLS_REGEX = r"^" + BASE_URL + 'ldtplatform/api/.*$'
bb1d902e0f63 add cors headers to api
ymh <ymh.work@gmail.com>
parents: 171
diff changeset
   266
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
#forced settings    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   268
MAX_TAG_LENGTH = 255
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
   269
FORCE_LOWERCASE_TAGS = True
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 91
diff changeset
   270
171
e809ae17472a V.2.12 : requires ldt v1.53, remove tagging, add taggit
cavaliet
parents: 159
diff changeset
   271
TAGGIT_TAGCLOUD_MIN = 1.0
e809ae17472a V.2.12 : requires ldt v1.53, remove tagging, add taggit
cavaliet
parents: 159
diff changeset
   272
TAGGIT_TAGCLOUD_MAX = 12.0