我在服务器Ubuntu 16.04.3 x64
上部署了我的网站我不知道主模板list.html它不起作用其他模板正常工作。
我检查了访问权限文件它们是相同的
设置如下所示
"""
Django settings for INZ project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/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__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '#wx61%!ioz(yba#e=t7jh-*&(!l#kri=^y%ik(x4m3j8oix+hq'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['46.101.116.26']
EMAIL_HOST ='smtp.gmail.com'
EMAIL_HOST_USER ='luke.rudzinski@gmail.com'
EMAIL_HOST_PASSWORD = '#####'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'games'
]
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 = 'INZ.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(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',
],
},
},
]
WSGI_APPLICATION = 'INZ.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
在localhost上,每个人都可以。我有Windows 8.1也许是我问题的原因,因为在win上有不同的文件结构
答案 0 :(得分:0)
与Windows不同,Linux上的文件系统区分大小写。将文件从List.html
重命名为list.html
以匹配您的代码。