我正在运行基于Django Cookiecutter的Django。
一旦我构建(index.rst
Docs
new_starter.rst
subject_guides.rst
New starter
first_week.rst
second_week.rst
Subject guides
stress.rst
aerodynamics.rst
data_science.rst
)并开始(docker-compose build
),一切似乎都运行得很好。
然而,当我尝试打开网站时,我得到docker-compose up
。
在日志中有一个错误消息Internal server error
我无法找到任何信息,除非我必须将/usr/local/lib/python3.5/site-packages/raven/conf/remote.py:88: UserWarning: Transport selection via DSN is deprecated. You should explicitly pass the transport class to Client() instead.
添加到我的设置中。
这是我当前的设置文件:
RAVEN_CONFIG = {}
由于我还没有SSL证书,因此全部关闭。
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import environ
ROOT_DIR = environ.Path(__file__) - 3 # (oz_m_de/config/settings/base.py - 3 = oz_m_de/)
APPS_DIR = ROOT_DIR.path('oz_m_de')
env = environ.Env()
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False)
if READ_DOT_ENV_FILE:
env_file = str(ROOT_DIR.path('.env'))
print('Loading : {}'.format(env_file))
env.read_env(env_file)
print('The .env file has been loaded. See base.py for more information')
DJANGO_APPS = [
# Default Django apps:
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Useful template tags:
# 'django.contrib.humanize',
# Admin
'django.contrib.admin',
]
THIRD_PARTY_APPS = [
'crispy_forms', # Form layouts
'allauth', # registration
'allauth.account', # registration
'allauth.socialaccount', # registration
]
LOCAL_APPS = [
'oz_m_de.users.apps.UsersConfig',
]
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
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',
]