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 from settings_logging import LOGGING
19 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
22 # Application definition
26 'django.contrib.admin',
27 'django.contrib.auth',
28 'django.contrib.contenttypes',
29 'django.contrib.sessions',
30 'django.contrib.messages',
31 'django.contrib.staticfiles',
32 'django.contrib.webdesign',
39 MIDDLEWARE_CLASSES = (
40 'django.contrib.sessions.middleware.SessionMiddleware',
41 'django.middleware.common.CommonMiddleware',
42 'django.middleware.csrf.CsrfViewMiddleware',
43 'django.contrib.auth.middleware.AuthenticationMiddleware',
44 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
45 'django.contrib.messages.middleware.MessageMiddleware',
46 'django.middleware.clickjacking.XFrameOptionsMiddleware',
49 TEMPLATE_CONTEXT_PROCESSORS = defaults.TEMPLATE_CONTEXT_PROCESSORS + (
50 'django.core.context_processors.request',
53 ROOT_URLCONF = 'plgng.urls'
55 WSGI_APPLICATION = 'plgng.wsgi.application'
58 # Internationalization
59 # https://docs.djangoproject.com/en/1.7/topics/i18n/
63 TIME_ZONE = 'Europe/Warsaw'
72 CUSTOM_DATETIME_FORMAT = 'j b Y, H:i'
75 # Static files (CSS, JavaScript, Images)
76 # https://docs.djangoproject.com/en/1.7/howto/static-files/
78 STATIC_URL = '/static/'
83 AUTH_USER_MODEL = 'qcg.User'
85 AUTHENTICATION_BACKENDS = (
86 'django_openid_auth.auth.OpenIDBackend',
87 'django.contrib.auth.backends.ModelBackend',
90 LOGIN_URL = 'openid-login'
91 LOGIN_REDIRECT_URL = '/jobs/'
93 # If set, always use this as the identity URL rather than asking the
94 # user. This only makes sense if it is a server URL.
95 OPENID_SSO_SERVER_URL = 'https://openid.plgrid.pl/gateway'
97 # Should users be created when new OpenIDs are used to log in?
98 OPENID_CREATE_USERS = True
100 # Update user details from OpenID each time they log in
101 OPENID_UPDATE_DETAILS_FROM_SREG = True
103 # Login will fail if no 'nickname' (username), or if the nickname
104 # conflicts with an existing user with a different openid identity url
105 OPENID_STRICT_USERNAMES = True
108 SESSION_COOKIE_NAME = 'qcg_session'
109 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
112 # 3-rd party settings
115 'horizontal_label_class': 'col-sm-3 col-md-4',
116 'horizontal_field_class': 'col-sm-9 col-md-6',
117 'set_placeholder': False,