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
15 from django.contrib.messages import constants as messages
18 from settings_logging import LOGGING
20 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
23 # Application definition
27 'django.contrib.admin',
28 'django.contrib.auth',
29 'django.contrib.contenttypes',
30 'django.contrib.sessions',
31 'django.contrib.messages',
32 'django.contrib.staticfiles',
33 'django.contrib.webdesign',
40 MIDDLEWARE_CLASSES = (
41 'django.contrib.sessions.middleware.SessionMiddleware',
42 'django.middleware.common.CommonMiddleware',
43 'django.middleware.csrf.CsrfViewMiddleware',
44 'django.contrib.auth.middleware.AuthenticationMiddleware',
45 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
46 'django.contrib.messages.middleware.MessageMiddleware',
47 'django.middleware.clickjacking.XFrameOptionsMiddleware',
50 TEMPLATE_CONTEXT_PROCESSORS = defaults.TEMPLATE_CONTEXT_PROCESSORS + (
51 'django.core.context_processors.request',
54 ROOT_URLCONF = 'plgng.urls'
56 WSGI_APPLICATION = 'plgng.wsgi.application'
59 # Internationalization
60 # https://docs.djangoproject.com/en/1.7/topics/i18n/
64 TIME_ZONE = 'Europe/Warsaw'
73 CUSTOM_DATETIME_FORMAT = 'j b Y, H:i'
76 # Static files (CSS, JavaScript, Images)
77 # https://docs.djangoproject.com/en/1.7/howto/static-files/
79 STATIC_URL = '/static/'
84 AUTH_USER_MODEL = 'qcg.User'
86 AUTHENTICATION_BACKENDS = (
87 'django_openid_auth.auth.OpenIDBackend',
88 'django.contrib.auth.backends.ModelBackend',
91 LOGIN_URL = 'openid-login'
92 LOGIN_REDIRECT_URL = '/jobs/'
94 # If set, always use this as the identity URL rather than asking the
95 # user. This only makes sense if it is a server URL.
96 OPENID_SSO_SERVER_URL = 'https://openid.plgrid.pl/gateway'
98 # Should users be created when new OpenIDs are used to log in?
99 OPENID_CREATE_USERS = True
101 # Update user details from OpenID each time they log in
102 OPENID_UPDATE_DETAILS_FROM_SREG = True
104 # Login will fail if no 'nickname' (username), or if the nickname
105 # conflicts with an existing user with a different openid identity url
106 OPENID_STRICT_USERNAMES = True
109 SESSION_COOKIE_NAME = 'qcg_session'
110 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
113 # 3-rd party settings
116 'horizontal_label_class': 'col-sm-3 col-md-4',
117 'horizontal_field_class': 'col-sm-9 col-md-6',
118 'set_placeholder': False,
121 # map message tags to bootstrap classes
124 messages.INFO: 'alert alert-info',
125 messages.SUCCESS: 'alert alert-success',
126 messages.WARNING: 'alert alert-warning',
127 messages.ERROR: 'alert alert-danger',