mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 08:11:08 -05:00
121 lines
3.3 KiB
Python
121 lines
3.3 KiB
Python
from django.conf import settings as django_settings
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
SECRET_KEY = 'django-insecure-key-for-development'
|
|
DEBUG = True
|
|
ALLOWED_HOSTS = []
|
|
|
|
# Application definition
|
|
INSTALLED_APPS = [
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.sites.apps.SitesConfig',
|
|
'django.contrib.humanize.apps.HumanizeConfig',
|
|
'django_nyt.apps.DjangoNytConfig',
|
|
'mptt',
|
|
'sorl.thumbnail',
|
|
'wiki.apps.WikiConfig', # Main wiki app
|
|
'wiki.plugins.parks.apps.ParksPluginConfig', # Parks plugin
|
|
]
|
|
|
|
MIDDLEWARE = [
|
|
'django.middleware.security.SecurityMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
]
|
|
|
|
ROOT_URLCONF = 'thrillwiki.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [BASE_DIR / 'templates'],
|
|
'APP_DIRS': True,
|
|
'OPTIONS': {
|
|
'context_processors': [
|
|
'django.template.context_processors.debug',
|
|
'django.template.context_processors.request',
|
|
'django.contrib.auth.context_processors.auth',
|
|
'django.contrib.messages.context_processors.messages',
|
|
'django.template.context_processors.media',
|
|
'django.template.context_processors.static',
|
|
'django.template.context_processors.tz',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'thrillwiki.wsgi.application'
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql',
|
|
'NAME': 'thrillwiki',
|
|
'USER': 'postgres',
|
|
'PASSWORD': 'postgres',
|
|
'HOST': 'localhost',
|
|
'PORT': '5432',
|
|
}
|
|
}
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
},
|
|
]
|
|
|
|
# Wiki settings
|
|
WIKI_ACCOUNT_HANDLING = True
|
|
WIKI_ACCOUNT_SIGNUP_ALLOWED = True
|
|
WIKI_ANONYMOUS = True
|
|
WIKI_ANONYMOUS_WRITE = False
|
|
WIKI_MARKDOWN_HTML_ATTRIBUTES = True
|
|
WIKI_MARKDOWN_HTML_STYLES = True
|
|
|
|
SITE_ID = 1
|
|
|
|
# Internationalization
|
|
LANGUAGE_CODE = 'en-us'
|
|
TIME_ZONE = 'UTC'
|
|
USE_I18N = True
|
|
USE_TZ = True
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
STATIC_URL = 'static/'
|
|
STATIC_ROOT = BASE_DIR / 'staticfiles'
|
|
STATICFILES_DIRS = [
|
|
BASE_DIR / 'static',
|
|
]
|
|
|
|
# Media files
|
|
MEDIA_URL = '/media/'
|
|
MEDIA_ROOT = BASE_DIR / 'uploads'
|
|
|
|
# Default primary key field type
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
|
|
# Email settings
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|