2 Django settings for django_simple project.
4 Generated by 'django-admin startproject' using Django 1.10.6.
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.10/topics/settings/
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.10/ref/settings/
14 from django.core.mail import send_mail
16 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
17 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
20 # Quick-start development settings - unsuitable for production
21 # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
23 # SECURITY WARNING: keep the secret key used in production secret!
24 SECRET_KEY = '6vvra1b^on8r)92+76lwh5*#88dler(o=k=gp0jv8l#ox0w01t'
26 # SECURITY WARNING: don't run with debug turned on in production!
29 ALLOWED_HOSTS = ["ha1.chem.univ.gda.pl"]
31 ACCOUNT_ACTIVATION_DAYS = 2 # two days
33 # Application definition
36 'django.contrib.admin',
37 'django.contrib.auth',
38 'django.contrib.contenttypes',
39 'django.contrib.sessions',
40 'django.contrib.messages',
41 'django.contrib.staticfiles',
42 'django_simple.authentication',
44 'django_simple.directory',
48 MIDDLEWARE_CLASSES = [
49 'django.middleware.security.SecurityMiddleware',
50 'django.contrib.sessions.middleware.SessionMiddleware',
51 'django.middleware.common.CommonMiddleware',
52 'django.middleware.csrf.CsrfViewMiddleware',
53 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
55 'django.contrib.messages.middleware.MessageMiddleware',
56 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59 ROOT_URLCONF = 'django_simple.urls'
63 'BACKEND': 'django.template.backends.django.DjangoTemplates',
67 'context_processors': [
68 'django.template.context_processors.debug',
69 'django.template.context_processors.request',
70 'django.contrib.auth.context_processors.auth',
71 'django.contrib.messages.context_processors.messages',
77 WSGI_APPLICATION = 'django_simple.wsgi.application'
81 # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
85 'ENGINE': 'django.db.backends.sqlite3',
86 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
92 # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
94 AUTH_PASSWORD_VALIDATORS = [
96 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
99 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
102 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
105 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
110 # Internationalization
111 # https://docs.djangoproject.com/en/1.10/topics/i18n/
113 LANGUAGE_CODE = 'en-us'
124 # Static files (CSS, JavaScript, Images)
125 # https://docs.djangoproject.com/en/1.10/howto/static-files/
127 STATIC_URL = '/static/'
130 os.path.join(BASE_DIR, "static"),
133 LOGIN_URL = '/login/'
136 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
137 #EMAIL_USE_TLS = True
139 #EMAIL_HOST = 'smtp.localhost'
140 #EMAIL_HOST_USER = 'admin@localhost'
141 #EMAIL_HOST_PASSWORD = 'yourPassword'
142 SERVER_EMAIL = 'admin@ha1.chem.univ.gda.pl'
143 DEFAULT_FROM_EMAIL = 'UNRES server Admin <admin@ha1.chem.univ.gda.pl>'
145 LOGIN_REDIRECT_URL = '/'