web/ldtplatform/settings.py
author verrierj
Fri, 28 Oct 2011 11:01:40 +0200
changeset 228 94fdb72b7d56
parent 183 89334901b7c2
child 232 2878499a372b
permissions -rw-r--r--
Users can add their own groups
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#@PydevCodeAnalysisIgnore
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import os.path
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
     3
import ldtplatform
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
# Django settings for project.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
DEBUG = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
TEMPLATE_DEBUG = DEBUG
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
ADMINS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    # ('Your Name', 'your_email@domain.com'),
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
MANAGERS = ADMINS
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
DATABASES = {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    'default': {
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        'NAME': '',                      # Or path to database file if using sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
        'USER': '',                      # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        'PASSWORD': '',                  # Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    }
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
# Local time zone for this installation. Choices can be found here:
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
# although not all choices may be available on all operating systems.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
# 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
    30
# system time zone.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
TIME_ZONE = 'Europe/Paris'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
# Language code for this installation. All choices can be found here:
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
# http://www.i18nguy.com/unicode/language-identifiers.html
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
LANGUAGE_CODE = 'fr-fr'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
ugettext = lambda s: s
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
LANGUAGES = ( 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    ('fr', ugettext('French')),
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
    41
    ('en', ugettext('English')),
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
)
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
SITE_ID = 1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
# 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
    48
# to load the internationalization machinery.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
USE_I18N = True
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
# Absolute path to the directory that holds media.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
# 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
    53
#MEDIA_ROOT = ''
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
    54
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
    55
# 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
    56
#STATIC_URL = '/static/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
# 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
    59
# trailing slash if there is a path component (optional in other cases).
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
# 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
    61
#MEDIA_URL = ''
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
# 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
    64
# trailing slash.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
# 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
    66
#ADMIN_MEDIA_PREFIX = '/media/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
122
f3a013f66974 Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents: 109
diff changeset
    68
#LDT_MEDIA_PREFIX = '/ldt/'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
# Make this unique, and don't share it with anybody.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma'
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
# List of callables that know how to import templates from various sources.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
TEMPLATE_LOADERS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
    'django.template.loaders.filesystem.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
    'django.template.loaders.app_directories.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
#     'django.template.loaders.eggs.Loader',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
MIDDLEWARE_CLASSES = (
76
a29face9a74b add gzip middleware
ymh <ymh.work@gmail.com>
parents: 73
diff changeset
    81
    'django.middleware.gzip.GZipMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
    'django.middleware.common.CommonMiddleware',
71
8a881c9593d0 Add swfupload for local upload to create content view, with progress bar and error management.
cavaliet
parents: 68
diff changeset
    83
    'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
    'django.contrib.sessions.middleware.SessionMiddleware',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
    'django.middleware.csrf.CsrfViewMiddleware',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
    'django.contrib.auth.middleware.AuthenticationMiddleware',
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
    87
    #'django.middleware.locale.LocaleMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
    'django.contrib.messages.middleware.MessageMiddleware',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
    89
    'django_openid_consumer.middleware.OpenIDMiddleware',
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
    90
    'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
TEMPLATE_CONTEXT_PROCESSORS = ( 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
    "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
    95
    "django.contrib.auth.context_processors.auth",
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
    "django.core.context_processors.debug",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
    "django.core.context_processors.i18n",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
    "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
    99
    "django.core.context_processors.static",
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   100
    "ldt.utils.context_processors.ldt_context",
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
6
7bc847aaccac clean media
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
   104
ROOT_URLCONF = 'ldtplatform.urls'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
TEMPLATE_DIRS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
    # Always use forward slashes, even on Windows.
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
    # Don't forget to use absolute paths, not relative paths.
183
89334901b7c2 Improve search page
verrierj
parents: 177
diff changeset
   110
    os.path.join(os.path.basename(__file__), 'templates'), 
89334901b7c2 Improve search page
verrierj
parents: 177
diff changeset
   111
    os.path.join(os.path.dirname(__file__), 'templates'),  
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
)
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   113
    
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   114
FIXTURES_DIRS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   115
    os.path.join(os.path.basename(__file__), 'fixtures'),
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   116
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   117
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
INSTALLED_APPS = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
    'django_extensions',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
    'django.contrib.auth',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
    'django.contrib.contenttypes',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
    'django.contrib.sessions',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
    'django.contrib.sites',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
    'django.contrib.messages',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
    'django.contrib.admin',
104
b62a2a3e272d Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents: 103
diff changeset
   126
    'django.contrib.staticfiles',
2
93d48df946cb change platform to ldtplatform
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   127
    'ldtplatform',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
    'registration',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
    'tagging',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
    'ldt',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
    'ldt.core',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
    'ldt.ldt_utils',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   133
    'ldt.text',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
    'ldt.user',
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
    'ldt.management',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   136
    'oauth_provider',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   137
    'django_openid_consumer',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   138
    'piston',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   139
    'social_auth',
135
01f6e48255f7 add south
ymh <ymh.work@gmail.com>
parents: 6
diff changeset
   140
    'south',
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   141
    'guardian',
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
169
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   144
AUTH_PROFILE_MODULE = 'user.UserProfile'
64f24f8841ec Add profile to user
verrierj
parents: 161
diff changeset
   145
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
DECOUPAGE_BLACKLIST = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
     "de_PPP",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
ZIP_BLACKLIST = (
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
     "__MACOSX",
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
)
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   154
AUTHENTICATION_BACKENDS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   155
    'social_auth.backends.twitter.TwitterBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   156
    'social_auth.backends.facebook.FacebookBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   157
#    'social_auth.backends.google.GoogleOAuthBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   158
#    'social_auth.backends.google.GoogleOAuth2Backend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   159
    'social_auth.backends.google.GoogleBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   160
    'social_auth.backends.yahoo.YahooBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   161
#    'social_auth.backends.contrib.linkedin.LinkedinBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   162
#    'social_auth.backends.contrib.LiveJournalBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   163
#    'social_auth.backends.contrib.orkut.OrkutBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   164
    'social_auth.backends.OpenIDBackend',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   165
    'django.contrib.auth.backends.ModelBackend',
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   166
    'guardian.backends.ObjectPermissionBackend',
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   167
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   168
SOCIAL_AUTH_IMPORT_BACKENDS = (
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   169
    'myproy.social_auth_extra_services',
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   170
)
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   171
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
ACCOUNT_ACTIVATION_DAYS = 7 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
LDT_MAX_SEARCH_NUMBER = 50
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
LDT_JSON_DEFAULT_INDENT = 2
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
68
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   177
OAUTH_PROVIDER_KEY_SIZE = 32
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   178
OAUTH_PROVIDER_SECRET_SIZE = 32
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   179
OAUTH_PROVIDER_VERIFIER_SIZE = 10
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   180
OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   181
OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   182
OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   183
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888"
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   184
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   185
TWITTER_CONSUMER_KEY     = 'UxAdbOLSo4Mx3CXIwDG9Eg'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   186
TWITTER_CONSUMER_SECRET  = '2PcWgdjnJL6Vp8srB40jeAo0fjMEtDnUwmAia6EUww'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   187
FACEBOOK_APP_ID = '163134140411313'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   188
FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   189
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   190
SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   191
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
5278175359e0 update lxml and nyromodal
ymh <ymh.work@gmail.com>
parents: 66
diff changeset
   192
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   193
# twitter testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   194
TEST_TWITTER_USER = 'jacquesverrier@gmail.com'
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 174
diff changeset
   195
TEST_TWITTER_PASSWORD = ''
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   196
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   197
# facebook testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   198
#TEST_FACEBOOK_USER = 'testing_account'
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   199
#TEST_FACEBOOK_PASSWORD = 'password_for_testing_account'
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   200
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   201
# google testing
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   202
TEST_GOOGLE_USER = 'jacquesverrier@gmail.com'
177
32fbed79d3a1 Display search results on multiple pages
verrierj
parents: 174
diff changeset
   203
TEST_GOOGLE_PASSWORD = ''
174
43748b6b0678 Add a default profile instead of get_or_create_profile
verrierj
parents: 169
diff changeset
   204
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
   205
AUTO_INDEX_AFTER_SAVE = True
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
228
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   207
ANONYMOUS_USER_ID = -1
94fdb72b7d56 Users can add their own groups
verrierj
parents: 183
diff changeset
   208
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   209
WEB_VERSION = ldtplatform.get_version()
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   210
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   211
from config import *
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   213
if not "LOGIN_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   214
    LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   215
if not "LOGOUT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   216
    LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/disconnect/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   217
if not "LOGIN_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   218
    LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform/ldt/'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   219
if not "LOGOUT_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   220
    LOGOUT_REDIRECT_URL = BASE_URL + 'ldtplatform/accounts/login'
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   221
if not "PROFILE_REDIRECT_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   222
    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
   223
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   224
if not "LOGIN_ERROR_URL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   225
    LOGIN_ERROR_URL = BASE_URL + 'ldtplatform/accounts/login'
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   226
73
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   227
if not "GLOBAL_LOG_LEVEL" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   228
    GLOBAL_LOG_LEVEL = LOG_LEVEL
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   229
if not "GLOBAL_LOG_HANDLERS" in locals():
ba3fa367c3c5 allow overriding all settings
ymh <ymh.work@gmail.com>
parents: 71
diff changeset
   230
    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
   231
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
   232
# 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
   233
# 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
   234
# Examples: "http://foo.com/media/", "/media/".
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   235
if not "ADMIN_MEDIA_PREFIX" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   236
    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
   237
# Used in a lot of templates
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   238
if not "LDT_MEDIA_PREFIX" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   239
    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
   240
# URL that handles the media served from MEDIA_ROOT.
109
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   241
if not "MEDIA_URL" in locals():
b823ac24bc88 update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents: 106
diff changeset
   242
    MEDIA_URL = BASE_URL + 'static/media/'
161
ec99af8284f5 Changed how the version number display #4
verrierj
parents: 136
diff changeset
   243