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
18 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
21 # Application definition
25 'django.contrib.admin',
26 'django.contrib.auth',
27 'django.contrib.contenttypes',
28 'django.contrib.sessions',
29 'django.contrib.messages',
30 'django.contrib.staticfiles',
31 'django.contrib.webdesign',
37 MIDDLEWARE_CLASSES = (
38 'django.contrib.sessions.middleware.SessionMiddleware',
39 'django.middleware.common.CommonMiddleware',
40 'django.middleware.csrf.CsrfViewMiddleware',
41 'django.contrib.auth.middleware.AuthenticationMiddleware',
42 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
44 'django.middleware.clickjacking.XFrameOptionsMiddleware',
47 TEMPLATE_CONTEXT_PROCESSORS = defaults.TEMPLATE_CONTEXT_PROCESSORS + (
48 'django.core.context_processors.request',
51 ROOT_URLCONF = 'plgng.urls'
53 WSGI_APPLICATION = 'plgng.wsgi.application'
56 # Internationalization
57 # https://docs.djangoproject.com/en/1.7/topics/i18n/
61 TIME_ZONE = 'Europe/Warsaw'
70 CUSTOM_DATETIME_FORMAT = 'j b Y, H:i'
73 # Static files (CSS, JavaScript, Images)
74 # https://docs.djangoproject.com/en/1.7/howto/static-files/
76 STATIC_URL = '/static/'
81 AUTH_USER_MODEL = 'qcg.User'
83 AUTHENTICATION_BACKENDS = (
84 'django_openid_auth.auth.OpenIDBackend',
85 'django.contrib.auth.backends.ModelBackend',
88 LOGIN_URL = 'openid-login'
89 LOGIN_REDIRECT_URL = '/jobs/'
91 # If set, always use this as the identity URL rather than asking the
92 # user. This only makes sense if it is a server URL.
93 OPENID_SSO_SERVER_URL = 'https://openid.plgrid.pl/gateway'
95 # Should users be created when new OpenIDs are used to log in?
96 OPENID_CREATE_USERS = True
98 # Update user details from OpenID each time they log in
99 OPENID_UPDATE_DETAILS_FROM_SREG = True
101 # Login will fail if no 'nickname' (username), or if the nickname
102 # conflicts with an existing user with a different openid identity url
103 OPENID_STRICT_USERNAMES = True
106 SESSION_COOKIE_NAME = 'qcg_session'
107 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
110 # 3-rd party settings
113 'horizontal_label_class': 'col-sm-3 col-md-4',
114 'horizontal_field_class': 'col-sm-9 col-md-6',
115 'set_placeholder': False,