Projet

Général

Profil

Télécharger (2,8 ko) Statistiques
| Branche: | Tag: | Révision:

root / corbo / settings.py @ f38ae358

1
"""
2
Django settings for corbo project.
3

    
4
For more information on this file, see
5
https://docs.djangoproject.com/en/1.7/topics/settings/
6

    
7
For the full list of settings and their values, see
8
https://docs.djangoproject.com/en/1.7/ref/settings/
9
"""
10

    
11
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12
import os
13

    
14
from django.conf import global_settings
15

    
16
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
17

    
18
# Quick-start development settings - unsuitable for production
19
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
20

    
21
# SECURITY WARNING: keep the secret key used in production secret!
22
SECRET_KEY = '$%7m&rq1-&$c77a1s^_$=xgiqez-%_x3^&5=*^-4(6si2zu59z'
23

    
24
# SECURITY WARNING: don't run with debug turned on in production!
25
DEBUG = True
26

    
27
TEMPLATE_DEBUG = True
28

    
29
ALLOWED_HOSTS = []
30

    
31

    
32
# Application definition
33

    
34
INSTALLED_APPS = (
35
    'corbo',
36
    'ckeditor',
37
    'gadjo',
38
    'django.contrib.auth',
39
    'django.contrib.admin',
40
    'django.contrib.contenttypes',
41
    'django.contrib.sessions',
42
    'django.contrib.messages',
43
    'django.contrib.staticfiles',
44
)
45

    
46
MIDDLEWARE_CLASSES = (
47
    'django.contrib.sessions.middleware.SessionMiddleware',
48
    'django.middleware.common.CommonMiddleware',
49
    'django.middleware.csrf.CsrfViewMiddleware',
50
    'django.contrib.auth.middleware.AuthenticationMiddleware',
51
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
52
    'django.contrib.messages.middleware.MessageMiddleware',
53
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
54
)
55

    
56
ROOT_URLCONF = 'corbo.urls'
57

    
58
WSGI_APPLICATION = 'corbo.wsgi.application'
59

    
60

    
61
# Database
62
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
63

    
64
DATABASES = {
65
    'default': {
66
        'ENGINE': 'django.db.backends.sqlite3',
67
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
68
    }
69
}
70

    
71
# Internationalization
72
# https://docs.djangoproject.com/en/1.7/topics/i18n/
73

    
74
LANGUAGE_CODE = 'en-us'
75

    
76
TIME_ZONE = 'UTC'
77

    
78
USE_I18N = True
79

    
80
USE_L10N = True
81

    
82
USE_TZ = True
83

    
84
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',)
85

    
86

    
87
# Static files (CSS, JavaScript, Images)
88
# https://docs.djangoproject.com/en/1.7/howto/static-files/
89

    
90
STATIC_URL = '/static/'
91

    
92
STATIC_ROOT = 'static'
93

    
94
CKEDITOR_UPLOAD_PATH = 'ckeditor/uploads'
95

    
96
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
97
MEDIA_URL = '/media/'
98

    
99
ANNOUNCES_PER_PAGE = 20
100

    
101
RSS_TITLE = 'Announces'
102
RSS_DESCRIPTION = ''
103
RSS_LINK = ''
104
RSS_LINK_TEMPLATE = '/#announce{0}'
105

    
106
# django-mellon settings
107
MELLON_ATTRIBUTE_MAPPING = {
108
    'username': '{attributes[username][0]}',
109
    'email': '{attributes[email][0]}',
110
    'first_name': '{attributes[first_name][0]}',
111
    'last_name': '{attributes[last_name][0]}',
112
}
113

    
114
if 'mellon' in INSTALLED_APPS:
115
    AUTHENTICATION_BACKENDS = ('mellon.backends.SAMLBackend', )
116
    LOGIN_URL = 'mellon_login'
117
    LOGOUT_URL = 'mellon_logout'
(6-6/11)