"""
Django settings for book_manager project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.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/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 's-%1csp18734$ufehhgs)0wm4r9gk)w9hx$h0sycojel346z7n'
# 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',
'front',
]
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 = 'book_manager.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',
],
'builtins':['django.templatetags.static']
},
},
]
WSGI_APPLICATION = 'book_manager.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'PORT':'3306',
'USER':'root',
'PASSWORD':'123456',
'HOST':'localhost',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.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/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
book_manager.rar (31个子文件)
book_manager
templates
add_book.html 632B
index.html 543B
base.html 419B
book_detail.html 338B
book_manager
__pycache__
urls.cpython-36.pyc 1016B
__init__.cpython-36.pyc 123B
settings.cpython-36.pyc 2KB
wsgi.cpython-36.pyc 536B
wsgi.py 417B
__init__.py 0B
settings.py 3KB
asgi.py 417B
urls.py 944B
.idea
book_manager.iml 1KB
misc.xml 193B
modules.xml 276B
workspace.xml 21KB
inspectionProfiles
front
models.py 60B
apps.py 90B
__pycache__
admin.cpython-36.pyc 157B
views.cpython-36.pyc 1KB
__init__.cpython-36.pyc 116B
models.cpython-36.pyc 154B
static
front
base.css 323B
__init__.py 0B
migrations
__pycache__
__init__.cpython-36.pyc 127B
__init__.py 0B
views.py 1KB
admin.py 66B
tests.py 63B
manage.py 653B
共 31 条
- 1
资源评论
- w3c88882020-08-15源码里没有建表语句啊
- dhzxzzh2021-12-26补充一下建表语句 CREATE TABLE book ( bid INT AUTO_INCREMENT, bname VARCHAR(50), author VARCHAR(50), PRIMARY KEY(bid) );
@小时候可乖了@
- 粉丝: 195
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功