|
@@ -1,20 +1,20 @@
|
|
|
"""
|
|
|
-Django settings for {{ project_name }} project.
|
|
|
+Django settings for dev project.
|
|
|
|
|
|
-Generated by 'django-admin startproject' using Django {{ django_version }}.
|
|
|
+Generated by 'django-admin startproject' using Django 1.11.15.
|
|
|
|
|
|
For more information on this file, see
|
|
|
-https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/
|
|
|
+https://docs.djangoproject.com/en/1.11/topics/settings/
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
-https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
|
|
|
+https://docs.djangoproject.com/en/1.11/ref/settings/
|
|
|
"""
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
+BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
|
|
|
# Define placeholder gettext function
|
|
@@ -24,10 +24,10 @@ _ = lambda s: s
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
-# See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/
|
|
|
+# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
-SECRET_KEY = '{{ secret_key }}'
|
|
|
+SECRET_KEY = '1znyfpwp*_#!r0#l248lht*6)_0b+504n*2-8cxf(2u)fhi0f^'
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
DEBUG = True
|
|
@@ -40,23 +40,23 @@ ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
|
# Database
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases
|
|
|
+# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
|
|
|
|
|
DATABASES = {
|
|
|
'default': {
|
|
|
# Misago requires PostgreSQL to run
|
|
|
'ENGINE': 'django.db.backends.postgresql',
|
|
|
- 'NAME': '',
|
|
|
- 'USER': '',
|
|
|
- 'PASSWORD': '',
|
|
|
- 'HOST': 'localhost',
|
|
|
+ 'NAME': os.environ.get('POSTGRES_DB'),
|
|
|
+ 'USER': os.environ.get('POSTGRES_USER'),
|
|
|
+ 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
|
|
|
+ 'HOST': os.environ.get('POSTGRES_HOST'),
|
|
|
'PORT': 5432,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
# Caching
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/topics/cache/#setting-up-the-cache
|
|
|
+# https://docs.djangoproject.com/en/1.11/topics/cache/#setting-up-the-cache
|
|
|
|
|
|
CACHES = {
|
|
|
'default': {
|
|
@@ -67,7 +67,7 @@ CACHES = {
|
|
|
|
|
|
|
|
|
# Password validation
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators
|
|
|
+# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
{
|
|
@@ -92,7 +92,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/
|
|
|
+# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
@@ -106,25 +106,25 @@ USE_TZ = True
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
|
|
|
+# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
|
# User uploads (Avatars, Attachments, files uploaded in other Django apps, ect.)
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
|
|
|
+# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
|
|
|
|
|
MEDIA_URL = '/media/'
|
|
|
|
|
|
|
|
|
# The absolute path to the directory where collectstatic will collect static files for deployment.
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#static-root
|
|
|
+# https://docs.djangoproject.com/en/1.11/ref/settings/#static-root
|
|
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
|
|
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#media-root
|
|
|
+# https://docs.djangoproject.com/en/1.11/ref/settings/#media-root
|
|
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
|
@@ -133,13 +133,11 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
# is enabled, e.g. if you use the collectstatic or findstatic management command or use the static file serving view.
|
|
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#staticfiles-dirs
|
|
|
|
|
|
-STATICFILES_DIRS = [
|
|
|
- os.path.join(BASE_DIR, 'theme', 'static'),
|
|
|
-]
|
|
|
+STATICFILES_DIRS = []
|
|
|
|
|
|
|
|
|
# Email configuration
|
|
|
-# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#email-backend
|
|
|
+# https://docs.djangoproject.com/en/1.11/ref/settings/#email-backend
|
|
|
|
|
|
EMAIL_HOST = 'localhost'
|
|
|
EMAIL_PORT = 25
|
|
@@ -234,7 +232,7 @@ MIDDLEWARE = [
|
|
|
'misago.core.middleware.threadstore.ThreadStoreMiddleware',
|
|
|
]
|
|
|
|
|
|
-ROOT_URLCONF = '{{ project_name }}.urls'
|
|
|
+ROOT_URLCONF = 'devproject.urls'
|
|
|
|
|
|
SOCIAL_AUTH_PIPELINE = (
|
|
|
# Steps required by social pipeline to work - don't delete those!
|
|
@@ -273,9 +271,7 @@ SOCIAL_AUTH_POSTGRES_JSONFIELD = True
|
|
|
TEMPLATES = [
|
|
|
{
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
- 'DIRS': [
|
|
|
- os.path.join(BASE_DIR, 'theme', 'templates'),
|
|
|
- ],
|
|
|
+ 'DIRS': [],
|
|
|
'APP_DIRS': True,
|
|
|
'OPTIONS': {
|
|
|
'context_processors': [
|
|
@@ -310,7 +306,7 @@ TEMPLATES = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
|
|
|
+WSGI_APPLICATION = 'devproject.wsgi.application'
|
|
|
|
|
|
|
|
|
# Django Crispy Forms
|
|
@@ -444,3 +440,15 @@ MISAGO_PROFILE_FIELDS = [
|
|
|
],
|
|
|
},
|
|
|
]
|
|
|
+
|
|
|
+
|
|
|
+# Set dev instance to send e-mails to console
|
|
|
+
|
|
|
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|
|
+
|
|
|
+
|
|
|
+# Display debug toolbar if IN_MISAGO_DOCKER enviroment var is set to "1"
|
|
|
+
|
|
|
+DEBUG_TOOLBAR_CONFIG = {
|
|
|
+ 'SHOW_TOOLBAR_CALLBACK': 'misago.conf.debugtoolbar.enable_debug_toolbar'
|
|
|
+}
|