"""
Django settings for pythonWeb project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/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/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '+_&e*$h@cxaw4oz=)3pz8-4e11$4n!#wkq-gls9ni%x#@_9z7u'
# SECURITY WARNING: don't run with debug turned on in production!
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',
'mapServiceWeb.apps.MapservicewebConfig',
'polls.apps.PollsConfig',
]
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',
'django.middleware.locale.LocaleMiddleware', #设置本地语言
]
ROOT_URLCONF = 'pythonWeb.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'pythonWeb.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
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',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
# TIME_ZONE = 'UTC'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'
TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),)
# DIRS is a list of filesystem directories to check when loading Django templates; it’s a search path.
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',
],
},
},
]
没有合适的资源?快使用搜索试试~ 我知道了~
学习用django构建一个网站.zip
共57个文件
py:29个
xml:8个
len:6个
需积分: 0 1 下载量 150 浏览量
2023-09-28
22:56:14
上传
评论
收藏 730KB ZIP 举报
温馨提示
学习用django构建一个网站.zip
资源推荐
资源详情
资源评论
收起资源包目录
学习用django构建一个网站.zip (57个子文件)
pythonWeb-master
db.sqlite3 140KB
mapServiceWeb
__init__.py 0B
tests.py 60B
admin.py 63B
migrations
__init__.py 0B
apps.py 102B
models.py 417B
urls.py 208B
views.py 126B
.idea
dataSources
e540945b-d093-4bf3-8fc6-6eac8aa2022c.xml 18KB
d17e0aef-7e05-45e0-af15-fb4702463fac
storage.xml 124B
_metadata_
metadata 64KB
metadata.values.at 273B
metadata_i 32KB
metadata.keystream.len 8B
metadata.keystream 1024B
metadata.len 8B
metadata_i.len 8B
e540945b-d093-4bf3-8fc6-6eac8aa2022c
storage.xml 124B
_metadata_
metadata 64KB
metadata.values.at 105B
metadata_i 32KB
metadata.keystream.len 8B
metadata.keystream 1024B
metadata.len 8B
metadata_i.len 8B
d17e0aef-7e05-45e0-af15-fb4702463fac.xml 18KB
vcs.xml 180B
misc.xml 227B
dataSources.xml 1KB
modules.xml 270B
pythonWeb.iml 1KB
pythonWeb
__init__.py 0B
wsgi.py 395B
urls.py 861B
settings.py 4KB
manage.py 547B
blog
__init__.py 0B
tests.py 60B
admin.py 63B
migrations
__init__.py 0B
apps.py 83B
models.py 57B
views.py 63B
polls
__init__.py 0B
tests.py 523B
admin.py 573B
migrations
__init__.py 0B
0001_initial.py 1KB
apps.py 85B
models.py 1KB
templates
polls
detail.html 482B
index.html 367B
urls.py 558B
static
polls
style.css 97B
images
background.gif 697KB
views.py 2KB
共 57 条
- 1
资源评论
天天501
- 粉丝: 596
- 资源: 4666
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- python-leetcode面试题解之第162题寻找峰值-题解.zip
- python-leetcode面试题解之第161题相隔为1的编辑距离-题解.zip
- python-leetcode面试题解之第160题相交链表-题解.zip
- python-leetcode面试题解之第159题至少包含两个不同字符的最长子串-题解.zip
- python-leetcode面试题解之第158题用Read4读取N个字符II-多次调用-题解.zip
- Python 程序语言设计模式思路-行为型模式:策略模式:将算法封装成独立的类,并使它们可以互相替换及支付模式数据压缩
- main.py
- Last Loaded Test.DBK
- Screenshot_20240520_163011.jpg
- ubuntu-python3-whisper-tornado docker镜像 Dockerfile
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功