2 Django settings for plgng project.
4 For more information on this file, see
5 https://docs.djangoproject.com/en/1.7/topics/settings/
7 For the full list of settings and their values, see
8 https://docs.djangoproject.com/en/1.7/ref/settings/
11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 import django.conf.global_settings as defaults
17 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
20 # Quick-start development settings - unsuitable for production
21 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
23 # SECURITY WARNING: keep the secret key used in production secret!
24 SECRET_KEY = 'x%_rlnhibsxum1m5o_c5ac@p0nw+1r0&#k!v3+52)s(d=2$5y&'
26 # SECURITY WARNING: don't run with debug turned on in production!
34 # Application definition
38 'django.contrib.admin',
39 'django.contrib.auth',
40 'django.contrib.contenttypes',
41 'django.contrib.sessions',
42 'django.contrib.messages',
43 'django.contrib.staticfiles',
44 'django.contrib.webdesign',
50 MIDDLEWARE_CLASSES = (
51 'django.contrib.sessions.middleware.SessionMiddleware',
52 'django.middleware.common.CommonMiddleware',
53 'django.middleware.csrf.CsrfViewMiddleware',
54 'django.contrib.auth.middleware.AuthenticationMiddleware',
55 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
56 'django.contrib.messages.middleware.MessageMiddleware',
57 'django.middleware.clickjacking.XFrameOptionsMiddleware',
60 TEMPLATE_CONTEXT_PROCESSORS = defaults.TEMPLATE_CONTEXT_PROCESSORS + (
61 'django.core.context_processors.request',
64 ROOT_URLCONF = 'plgng.urls'
66 WSGI_APPLICATION = 'plgng.wsgi.application'
70 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
74 'ENGINE': 'django.db.backends.sqlite3',
75 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
79 # Internationalization
80 # https://docs.djangoproject.com/en/1.7/topics/i18n/
84 TIME_ZONE = 'Europe/Warsaw'
93 CUSTOM_DATETIME_FORMAT = 'j b Y, H:i'
96 # Static files (CSS, JavaScript, Images)
97 # https://docs.djangoproject.com/en/1.7/howto/static-files/
99 STATIC_URL = '/static/'
104 AUTH_USER_MODEL = 'qcg.User'
106 AUTHENTICATION_BACKENDS = (
107 'django_openid_auth.auth.OpenIDBackend',
108 'django.contrib.auth.backends.ModelBackend',
111 LOGIN_URL = 'openid-login'
112 LOGIN_REDIRECT_URL = '/jobs/'
114 # If set, always use this as the identity URL rather than asking the
115 # user. This only makes sense if it is a server URL.
116 OPENID_SSO_SERVER_URL = 'https://openid.plgrid.pl/gateway'
118 # Should users be created when new OpenIDs are used to log in?
119 OPENID_CREATE_USERS = True
121 # Update user details from OpenID each time they log in
122 OPENID_UPDATE_DETAILS_FROM_SREG = True
124 # Login will fail if no 'nickname' (username), or if the nickname
125 # conflicts with an existing user with a different openid identity url
126 OPENID_STRICT_USERNAMES = True
129 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
132 # 3-rd party settings
135 'horizontal_label_class': 'col-md-4',
136 'horizontal_field_class': 'col-md-6',
137 'set_placeholder': False,