web/ldtplatform/settings.py
author ymh <ymh.work@gmail.com>
Thu, 02 Feb 2012 12:36:05 +0100
changeset 501 5b198be85d50
parent 444 2711eef17092
child 538 fe030de531a6
permissions -rw-r--r--
small change after old platform migration
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
444
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 340
diff changeset
     1
# -*- coding: utf-8 -*-
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
#@PydevCodeAnalysisIgnore
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
import os.path
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
     4
import ldtplatform
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
# Django settings for project.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
DEBUG = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
TEMPLATE_DEBUG = DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
ADMINS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    # ('Your Name', 'your_email@domain.com'),
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
MANAGERS = ADMINS
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
DATABASES = {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    'default': {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
        'NAME': '',                      # Or path to database file if using sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        'USER': '',                      # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        'PASSWORD': '',                  # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    }
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
# Local time zone for this installation. Choices can be found here:
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
# although not all choices may be available on all operating systems.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
# If running in a Windows environment this must be set to the same as your
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
# system time zone.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
TIME_ZONE = 'Europe/Paris'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
# Language code for this installation. All choices can be found here:
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
# http://www.i18nguy.com/unicode/language-identifiers.html
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
LANGUAGE_CODE = 'fr-fr'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
ugettext = lambda s: s
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
LANGUAGES = ( 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    ('fr', ugettext('French')),
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
    42
    ('en', ugettext('English')),
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
SITE_ID = 1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
# If you set this to False, Django will make some optimizations so as not
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
# to load the internationalization machinery.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
USE_I18N = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
# Absolute path to the directory that holds media.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
# Example: "/home/media/media.lawrence.com/"
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    54
#MEDIA_ROOT = ''
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
    55
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
    56
# Root of static files used by each app, generated by code or uploaded by users
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    57
#STATIC_URL = '/static/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
# 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
    60
# trailing slash if there is a path component (optional in other cases).
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
# Examples: "http://media.lawrence.com", "http://example.com/media/"
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    62
#MEDIA_URL = ''
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
# 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
    65
# trailing slash.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
# Examples: "http://foo.com/media/", "/media/".
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    67
#ADMIN_MEDIA_PREFIX = '/media/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    69
#LDT_MEDIA_PREFIX = '/ldt/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
# Make this unique, and don't share it with anybody.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
# List of callables that know how to import templates from various sources.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
TEMPLATE_LOADERS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
    'django.template.loaders.filesystem.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
    'django.template.loaders.app_directories.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
#     'django.template.loaders.eggs.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
MIDDLEWARE_CLASSES = (
314
1a8620e5ebb0 Add memcached and sorl thumbnail pour thumbnail management. Set default pict on content, project and user.
cavaliet
parents: 242
diff changeset
    82
    'django.middleware.cache.UpdateCacheMiddleware',
1a8620e5ebb0 Add memcached and sorl thumbnail pour thumbnail management. Set default pict on content, project and user.
cavaliet
parents: 242
diff changeset
    83
    'django.middleware.common.CommonMiddleware',
1a8620e5ebb0 Add memcached and sorl thumbnail pour thumbnail management. Set default pict on content, project and user.
cavaliet
parents: 242
diff changeset
    84
    'django.middleware.cache.FetchFromCacheMiddleware',
76
a29face9a74b add gzip middleware
ymh <ymh.work@gmail.com>
parents: 73
diff changeset
    85
    'django.middleware.gzip.GZipMiddleware',
71
8a881c9593d0 Add swfupload for local upload to create content view, with progress bar and error management.
cavaliet
parents: 68
diff changeset
    86
    'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
    'django.contrib.sessions.middleware.SessionMiddleware',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
    'django.middleware.csrf.CsrfViewMiddleware',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
    'django.contrib.auth.middleware.AuthenticationMiddleware',
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
    90
    #'django.middleware.locale.LocaleMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
    'django.contrib.messages.middleware.MessageMiddleware',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
    92
    'django_openid_consumer.middleware.OpenIDMiddleware',
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
    93
    'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware',
239
352be36c9fd7 Moved code about group security into a separate module
verrierj
parents: 237
diff changeset
    94
    'ldt.security.middleware.SecurityMiddleware',
332
c28d4dc49a50 add API interface to add annotation, with an ajax example in the comment.
cavaliet
parents: 314
diff changeset
    95
    'ldt.api.middleware.pistonput.PistonPutMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
TEMPLATE_CONTEXT_PROCESSORS = ( 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
    "django.core.context_processors.request",
71
8a881c9593d0 Add swfupload for local upload to create content view, with progress bar and error management.
cavaliet
parents: 68
diff changeset
   100
    "django.contrib.auth.context_processors.auth",
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
    "django.core.context_processors.debug",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
    "django.core.context_processors.i18n",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
    "django.core.context_processors.media",
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
   104
    "django.core.context_processors.static",
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   105
    "ldt.utils.context_processors.ldt_context",
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
6
7bc847aaccac clean media
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
   109
ROOT_URLCONF = 'ldtplatform.urls'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
TEMPLATE_DIRS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
    # Always use forward slashes, even on Windows.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
    # Don't forget to use absolute paths, not relative paths.
183
89334901b7c2 Improve search page
verrierj
parents: 177
diff changeset
   115
    os.path.join(os.path.basename(__file__), 'templates'), 
89334901b7c2 Improve search page
verrierj
parents: 177
diff changeset
   116
    os.path.join(os.path.dirname(__file__), 'templates'),  
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
)
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   118
    
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   119
FIXTURES_DIRS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   120
    os.path.join(os.path.basename(__file__), 'fixtures'),
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   121
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   122
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
INSTALLED_APPS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
    'django_extensions',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
    'django.contrib.auth',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
    'django.contrib.contenttypes',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
    'django.contrib.sessions',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
    'django.contrib.sites',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
    'django.contrib.messages',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
    'django.contrib.admin',
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
   131
    'django.contrib.staticfiles',
2
93d48df946cb change platform to ldtplatform
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   132
    'ldtplatform',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
    'registration',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
    'tagging',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
    'ldt',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
    'ldt.core',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
    'ldt.ldt_utils',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   138
    'ldt.text',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
    'ldt.user',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
    'ldt.management',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   141
    'oauth_provider',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   142
    'django_openid_consumer',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   143
    'piston',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   144
    'social_auth',
135
01f6e48255f7 add south
ymh <ymh.work@gmail.com>
parents: 6
diff changeset
   145
    'south',
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   146
    'guardian',
314
1a8620e5ebb0 Add memcached and sorl thumbnail pour thumbnail management. Set default pict on content, project and user.
cavaliet
parents: 242
diff changeset
   147
    'sorl.thumbnail',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   150
AUTH_PROFILE_MODULE = 'user.UserProfile'
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   151
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
DECOUPAGE_BLACKLIST = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
     "de_PPP",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
ZIP_BLACKLIST = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
     "__MACOSX",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   160
AUTHENTICATION_BACKENDS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   161
    'social_auth.backends.twitter.TwitterBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   162
    'social_auth.backends.facebook.FacebookBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   163
#    'social_auth.backends.google.GoogleOAuthBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   164
#    'social_auth.backends.google.GoogleOAuth2Backend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   165
    'social_auth.backends.google.GoogleBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   166
    'social_auth.backends.yahoo.YahooBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   167
#    'social_auth.backends.contrib.linkedin.LinkedinBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   168
#    'social_auth.backends.contrib.LiveJournalBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   169
#    'social_auth.backends.contrib.orkut.OrkutBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   170
    'social_auth.backends.OpenIDBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   171
    'django.contrib.auth.backends.ModelBackend',
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   172
    'guardian.backends.ObjectPermissionBackend',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   173
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   174
SOCIAL_AUTH_IMPORT_BACKENDS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   175
    'myproy.social_auth_extra_services',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   176
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   177
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
ACCOUNT_ACTIVATION_DAYS = 7 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
LDT_MAX_SEARCH_NUMBER = 50
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
LDT_JSON_DEFAULT_INDENT = 2
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   183
OAUTH_PROVIDER_KEY_SIZE = 32
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   184
OAUTH_PROVIDER_SECRET_SIZE = 32
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   185
OAUTH_PROVIDER_VERIFIER_SIZE = 10
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   186
OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   187
OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   188
OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   189
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888"
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   190
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   191
TWITTER_CONSUMER_KEY     = 'UxAdbOLSo4Mx3CXIwDG9Eg'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   192
TWITTER_CONSUMER_SECRET  = '2PcWgdjnJL6Vp8srB40jeAo0fjMEtDnUwmAia6EUww'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   193
FACEBOOK_APP_ID = '163134140411313'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   194
FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   195
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   196
SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   197
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   198
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   199
# twitter testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   200
TEST_TWITTER_USER = 'jacquesverrier@gmail.com'
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 174
diff changeset
   201
TEST_TWITTER_PASSWORD = ''
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   202
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   203
# facebook testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   204
#TEST_FACEBOOK_USER = 'testing_account'
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   205
#TEST_FACEBOOK_PASSWORD = 'password_for_testing_account'
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   206
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   207
# google testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   208
TEST_GOOGLE_USER = 'jacquesverrier@gmail.com'
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 174
diff changeset
   209
TEST_GOOGLE_PASSWORD = ''
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   210
103
5578dcb54f4d merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents: 76
diff changeset
   211
AUTO_INDEX_AFTER_SAVE = True
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   213
ANONYMOUS_USER_ID = -1
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   214
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   215
WEB_VERSION = ldtplatform.get_version()
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   216
340
5f919a978f50 Stats for annotations volume can be computed using ./manage.py statannotation [-c content_id] or in the admin pages of module ldt_utils.
verrierj
parents: 332
diff changeset
   217
DIVISIONS_FOR_STAT_ANNOTATION = 64
5f919a978f50 Stats for annotations volume can be computed using ./manage.py statannotation [-c content_id] or in the admin pages of module ldt_utils.
verrierj
parents: 332
diff changeset
   218
501
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   219
FRONT_TAG_LIST = []
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   220
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   221
DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png"
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   222
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png"
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   223
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png"
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   224
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png"
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   225
PROFILE_IMG_MAX_SIZE = 1000000
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   226
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   227
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media']
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   228
FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   229
PUBLIC_GROUP_NAME = 'everyone'
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   230
MAX_USERS_SEARCH = 20
5b198be85d50 small change after old platform migration
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   231
444
2711eef17092 Update front tag list management with settings/config.
cavaliet
parents: 340
diff changeset
   232
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
from config import *
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   235
if not "LOGIN_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   236
    LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   237
if not "LOGOUT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   238
    LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/disconnect/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   239
if not "LOGIN_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   240
    LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform/ldt/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   241
if not "LOGOUT_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   242
    LOGOUT_REDIRECT_URL = BASE_URL + 'ldtplatform/accounts/login'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   243
if not "PROFILE_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   244
    PROFILE_REDIRECT_URL = BASE_URL + 'ldtplatform/auth_accounts/create/profile'
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   245
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   246
if not "LOGIN_ERROR_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   247
    LOGIN_ERROR_URL = BASE_URL + 'ldtplatform/accounts/login'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   249
if not "GLOBAL_LOG_LEVEL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   250
    GLOBAL_LOG_LEVEL = LOG_LEVEL
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   251
if not "GLOBAL_LOG_HANDLERS" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   252
    GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
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
   254
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
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
   255
# trailing slash.
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
   256
# Examples: "http://foo.com/media/", "/media/".
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   257
if not "ADMIN_MEDIA_PREFIX" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   258
    ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
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
   259
# Used in a lot of templates
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   260
if not "LDT_MEDIA_PREFIX" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   261
    LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
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
   262
# URL that handles the media served from MEDIA_ROOT.
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   263
if not "MEDIA_URL" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   264
    MEDIA_URL = BASE_URL + 'static/media/'
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   265