| commit | author | age | ||
| 83c3f6 | 1 | """ |
| SP | 2 | Django settings for aoi project. |
| 3 | ||
| 4 | Generated by 'django-admin startproject' using Django 2.0.7. | |
| 5 | ||
| 6 | For more information on this file, see | |
| 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ | |
| 8 | ||
| 9 | For the full list of settings and their values, see | |
| 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ | |
| 11 | """ | |
| 12 | ||
| 13 | import os | |
| 14 | ||
| 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) | |
| 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| 17 | ||
| 18 | ||
| 19 | # Quick-start development settings - unsuitable for production | |
| 20 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ | |
| 21 | ||
| 22 | # SECURITY WARNING: keep the secret key used in production secret! | |
| 23 | SECRET_KEY = "8!#bb3+b@2(#&+)2ju@(e*vd2l&rin*0sqy$a&!!fts*3*xf)e" | |
| 24 | ||
| 25 | # SECURITY WARNING: don't run with debug turned on in production! | |
| 26 | DEBUG = True | |
| 27 | ||
| 28 | ALLOWED_HOSTS = ['localhost',] | |
| 29 | ||
| 30 | ||
| 31 | # Application definition | |
| 32 | ||
| 33 | INSTALLED_APPS = [ | |
| 34 | "organization.apps.OrganizationConfig", | |
| 35 | "problem.apps.ProblemConfig", | |
| 36 | "exam.apps.ExamConfig", | |
| 37 | "scan.apps.ScanConfig", | |
| 38 | "web_template.apps.WebTemplateConfig", | |
| 39 | "studentpages.apps.StudentpagesConfig", | |
| 40 | "django_adminlte", | |
| 41 | # 'django_adminlte_theme', | |
| 42 | "djangobower", | |
| 43 | "django.contrib.admin", | |
| 44 | "django.contrib.auth", | |
| 45 | "django.contrib.contenttypes", | |
| 46 | "django.contrib.sessions", | |
| 47 | "django.contrib.messages", | |
| 48 | "django.contrib.staticfiles", | |
| 49 | "django_ajax", | |
| 50 | ] | |
| 51 | ||
| 52 | MIDDLEWARE = [ | |
| 53 | "django.middleware.security.SecurityMiddleware", | |
| 54 | "django.contrib.sessions.middleware.SessionMiddleware", | |
| 55 | "django.middleware.common.CommonMiddleware", | |
| 56 | "django.middleware.csrf.CsrfViewMiddleware", | |
| 57 | "django.contrib.auth.middleware.AuthenticationMiddleware", | |
| 58 | "django.contrib.messages.middleware.MessageMiddleware", | |
| 59 | "django.middleware.clickjacking.XFrameOptionsMiddleware", | |
| 60 | ] | |
| 61 | ||
| 62 | ROOT_URLCONF = "aoi.urls" | |
| 63 | ||
| 64 | TEMPLATES = [ | |
| 65 | { | |
| 66 | "BACKEND": "django.template.backends.django.DjangoTemplates", | |
| 67 | "DIRS": [], | |
| 68 | "APP_DIRS": True, | |
| 69 | "OPTIONS": { | |
| 70 | "context_processors": [ | |
| 71 | "django.template.context_processors.debug", | |
| 72 | "django.template.context_processors.request", | |
| 73 | "django.contrib.auth.context_processors.auth", | |
| 74 | "django.contrib.messages.context_processors.messages", | |
| 75 | ] | |
| 76 | }, | |
| 77 | } | |
| 78 | ] | |
| 79 | ||
| 80 | WSGI_APPLICATION = "aoi.wsgi.application" | |
| 81 | ||
| 82 | ||
| 83 | # Database | |
| 84 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases | |
| 85 | ||
| 86 | DATABASES = { | |
| 87 | "default": { | |
| 88 | # "ENGINE": "django.db.backends.sqlite3", | |
| 89 | # "NAME": os.path.join(BASE_DIR, "database/db.sqlite3"), | |
| 90 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
| 91 | # 'ENGINE': 'django.db.backends.mysql', | |
| 92 | 'NAME': 'sizif', | |
| 93 | 'USER': 'sizif', | |
| 94 | 'PASSWORD': 'sizif_insecure', | |
| 95 | 'HOST': 'postgres_db', | |
| 96 | 'PORT': '', | |
| 97 | } | |
| 98 | } | |
| 99 | ||
| 100 | ||
| 101 | # Password validation | |
| 102 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators | |
| 103 | ||
| 104 | AUTH_PASSWORD_VALIDATORS = [ | |
| 105 | { | |
| 106 | "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator" | |
| 107 | }, | |
| 108 | {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, | |
| 109 | {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, | |
| 110 | {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, | |
| 111 | ] | |
| 112 | ||
| 113 | ||
| 114 | # Internationalization | |
| 115 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ | |
| 116 | ||
| 117 | LANGUAGE_CODE = "sl-SI" | |
| 118 | ||
| 119 | TIME_ZONE = "UTC" | |
| 120 | ||
| 121 | USE_I18N = True | |
| 122 | ||
| 123 | USE_L10N = True | |
| 124 | ||
| 125 | USE_TZ = True | |
| 126 | ||
| 127 | ||
| 128 | # Static files (CSS, JavaScript, Images) | |
| 129 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ | |
| 130 | ||
| 131 | ||
| 132 | STATICFILES_FINDERS = [ | |
| 133 | "django.contrib.staticfiles.finders.FileSystemFinder", | |
| 134 | "django.contrib.staticfiles.finders.AppDirectoriesFinder", | |
| 135 | "djangobower.finders.BowerFinder", | |
| 136 | ] | |
| 137 | STATIC_URL = "/static/" | |
| 138 | #STATIC_ROOT = os.path.join(BASE_DIR, "static/") | |
| 139 | #STATICFILES_DIRS=[ os.path.join(BASE_DIR,'static'), ] | |
| 140 | BOWER_COMPONENTS_ROOT = os.path.join(BASE_DIR, "static_libraries/") | |
| 141 | ||
| 142 | BOWER_INSTALLED_APPS = ( | |
| 143 | "jquery#3.3.1", | |
| 144 | "bootstrap", | |
| 145 | "bootstrap-datepicker", | |
| 146 | "datatables", | |
| 147 | "jquery-sortable", | |
| 148 | "MathJax" | |
| 149 | ) | |
| 150 | ||
| 151 | BRAND_NAME = "SIZiF" | |
| 152 | BRAND_SHORT_NAME = "SZF" | |
| 153 | VERSION = "0.0" | |
| 154 | ||
| 155 | LOGIN_REDIRECT_URL = "/organization/loginlandingpage" | |
| 156 | LOGOUT_REDIRECT_URL = "/accounts/login" | |