I don't think I've ever gotten a solid idea that this is *necessary*, but I've seen other docs refer to/assume this, so sure?
187 lines
4.1 KiB
Python
187 lines
4.1 KiB
Python
"""
|
|
Django settings for dr_botzo project.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.6/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/1.6/ref/settings/
|
|
"""
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
import os
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
SECRET_KEY = '8@frp#a5wb)40g=#rbbxy($_!ttqw(*t_^os37_a*9kbx1xuvp'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
# Application definition
|
|
|
|
INSTALLED_APPS = (
|
|
'django.contrib.admin.apps.SimpleAdminConfig',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.sites',
|
|
'django_extensions',
|
|
'adminplus',
|
|
'bootstrap3',
|
|
'rest_framework',
|
|
'countdown',
|
|
'dispatch',
|
|
'facts',
|
|
'gitlab_bot',
|
|
'ircbot',
|
|
'karma',
|
|
'markov',
|
|
'pi',
|
|
'races',
|
|
'seen',
|
|
'storycraft',
|
|
)
|
|
|
|
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 = 'dr_botzo.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [os.path.join(BASE_DIR, 'dr_botzo', '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',
|
|
'dr_botzo.context_processors.site',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'dr_botzo.wsgi.application'
|
|
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
}
|
|
}
|
|
|
|
# inherited default, look at changing to BigAutoField
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
|
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# site ID, for anything that needs it (e.g. referring to the domain)
|
|
SITE_ID = 1
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATICFILES_DIRS = (
|
|
os.path.join(BASE_DIR, 'static'),
|
|
)
|
|
|
|
|
|
REST_FRAMEWORK = {
|
|
# Use Django's standard `django.contrib.auth` permissions,
|
|
# or allow read-only access for unauthenticated users.
|
|
'DEFAULT_PERMISSION_CLASSES': [
|
|
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
|
|
]
|
|
}
|
|
|
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
|
|
EMAIL_FILE_PATH = BASE_DIR
|
|
|
|
|
|
# bootstrap3
|
|
BOOTSTRAP3 = {
|
|
'include_jquery': True,
|
|
'javascript_in_head': True,
|
|
}
|
|
|
|
|
|
# IRC module stuff
|
|
|
|
# dice
|
|
|
|
DICE_PREFIX_ROLLER = False
|
|
|
|
# karma
|
|
|
|
KARMA_IGNORE_CHATTER_TARGETS = []
|
|
KARMA_IGNORE_COMMAND_TARGETS = []
|
|
|
|
# mpd
|
|
|
|
MPD_HOST = ""
|
|
MPD_PORT = None
|
|
MPD_PASS = None
|
|
MPD_SITE = ""
|
|
|
|
# storycraft
|
|
|
|
STORYCRAFT_MASTER_CHANNEL = '#dr.botzo'
|
|
STORYCRAFT_CONCURRENT_GAMES = 10
|
|
STORYCRAFT_DEFAULT_GAME_LENGTH = 20
|
|
STORYCRAFT_DEFAULT_LINE_LENGTH = 140
|
|
STORYCRAFT_DEFAULT_LINES_PER_TURN = 2
|
|
|
|
# weather
|
|
|
|
WEATHER_WEATHER_UNDERGROUND_API_KEY = None
|
|
|
|
|
|
# load local settings
|
|
|
|
try:
|
|
from dr_botzo.localsettings import *
|
|
except ImportError:
|
|
print("WARNING: no localsettings.py found!")
|