Add registration and login templates plus UI stuff, moderation

This commit is contained in:
Livvy Mackintosh
2017-10-08 21:21:51 +01:00
parent f8dc44b4a6
commit 049ca29e77
64 changed files with 18607 additions and 159 deletions

View File

@ -35,12 +35,18 @@ ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', 'localhost').split()
# Application definition
INSTALLED_APPS = [
'apps.contact',
'apps.map',
'apps.profiles',
'django.contrib.admin',
'registration',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',
'django.contrib.gis',
'bootstrap3',
@ -48,13 +54,16 @@ INSTALLED_APPS = [
'compressor',
'crispy_forms',
'django_extensions',
'envelope',
'leaflet',
'moderation',
'rest_framework',
'rest_framework_gis',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
@ -66,10 +75,12 @@ MIDDLEWARE = [
ROOT_URLCONF = 'ojusomap.urls'
SITE_ID = 1
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'ojusomap/templates/')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@ -95,7 +106,6 @@ EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER')
EMAIL_PORT = os.getenv('EMAIL_PORT', 25)
EMAIL_USE_TLS = bool(int(os.getenv('EMAIL_USE_TLS', False)))
EMAIL_SUBJECT_PREFIX = "Ojuso Platform"
SERVER_EMAIL = os.getenv('SERVER_EMAIL', 'root@localhost')
@ -131,6 +141,8 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# Registration (Redux)
ACCOUNT_ACTIVATION_DAYS = 3
# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
@ -163,10 +175,9 @@ STATIC_URL = os.getenv("STATIC_URL", '/static/')
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# Cache
# https://docs.djangoproject.com/en/1.11/topics/cache/
@ -204,7 +215,7 @@ REST_FRAMEWORK = {
# Django Crispy Forms
# http://django-crispy-forms.readthedocs.io/en/latest/
CRISPY_TEMPLATE_PACK = 'bootstrap3'
CRISPY_TEMPLATE_PACK = 'bootstrap4'
# Django-Leaflet
# https://django-leaflet.readthedocs.io/en/latest/