"""
Django settings for MyDjango project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-k&3xhjd=1$d2a$l1%#2h&an$_7$kok9!*7zms+dvj%2fyn5&7&'
# 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',
'library.apps.LibraryConfig',
]
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 = 'MyDjango.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [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 = 'MyDjango.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
# 数据库配置
DATABASES = {
'default': {
# 使用mysql数据库
'ENGINE': 'django.db.backends.mysql',
# ip地址
'HOST': '127.0.0.1',
# 端口号
'POST': 3306,
# 登入用户
'USER': 'root',
# 登入密码
'PASSWORD': '123456',
# 连接的库
'NAME': 'library',
# 设置编码
'CHARSET': 'utf8mb4'
}
}
# Password validation
# https://docs.djangoproject.com/en/3.2/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.2/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/'
# 静态文件目录
STATICFILES_DIRS = [
BASE_DIR / 'static'
]
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
没有合适的资源?快使用搜索试试~ 我知道了~
26.9 Django书籍管理练习
共72个文件
json:15个
py:15个
pyc:12个
0 下载量 45 浏览量
2024-08-03
09:33:56
上传
评论
收藏 1.09MB ZIP 举报
温馨提示
配套文件
资源推荐
资源详情
资源评论
收起资源包目录
26.9 Django书籍管理练习.zip (72个子文件)
26.9 Django书籍管理练习.eddx 668KB
数据库文件
django_admin_log.json 2B
auth_user.json 2B
library_book_author.json 324B
auth_group.json 2B
auth_user_user_permissions.json 2B
auth_permission.json 5KB
library_book.json 567B
django_content_type.json 783B
library_publish.json 321B
auth_group_permissions.json 2B
django_migrations.json 3KB
library_authordetail.json 270B
auth_user_groups.json 2B
library_author.json 180B
django_session.json 2B
MyDjango
library
__init__.py 0B
tests.py 321B
admin.py 248B
migrations
__init__.py 0B
0001_initial.py 2KB
__pycache__
0001_initial.cpython-38.pyc 2KB
__init__.cpython-38.pyc 133B
apps.py 152B
models.py 2KB
urls.py 502B
__pycache__
models.cpython-38.pyc 2KB
urls.cpython-38.pyc 459B
admin.cpython-38.pyc 314B
apps.cpython-38.pyc 401B
__init__.cpython-38.pyc 122B
views.cpython-38.pyc 2KB
views.py 3KB
templates
book_list.html 2KB
home.html 5KB
book_set.html 2KB
base.html 6KB
book_add.html 2KB
.idea
workspace.xml 7KB
misc.xml 188B
inspectionProfiles
profiles_settings.xml 174B
modules.xml 275B
.gitignore 184B
MyDjango.iml 1KB
manage.py 686B
MyDjango
__init__.py 0B
wsgi.py 409B
urls.py 876B
settings.py 4KB
__pycache__
wsgi.cpython-38.pyc 528B
urls.cpython-38.pyc 982B
settings.cpython-38.pyc 2KB
__init__.cpython-38.pyc 123B
asgi.py 409B
static
js
jquery.js 85KB
bootstrap-3.3.7-dist
js
bootstrap.js 68KB
npm.js 484B
bootstrap.min.js 36KB
css
bootstrap-theme.min.css.map 25KB
bootstrap.min.css 118KB
bootstrap-theme.css.map 47KB
bootstrap-theme.css 26KB
bootstrap.css.map 380KB
bootstrap.css 143KB
bootstrap-theme.min.css 23KB
bootstrap.min.css.map 529KB
fonts
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.woff2 18KB
26.9 Django书籍管理练习.md 57KB
共 72 条
- 1
资源评论
开局签到Python基础
- 粉丝: 871
- 资源: 71
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 树轮重建的长江中下游地区夏季降水数据
- Screenshot_20240919_110009_CSDN.jpg
- 基于vue+antv x6的web组态系统插件,可在系统中直接引用.zip(毕设&课设&实训&大作业&竞赛&项目)
- 解决PlatformIO在VScode中初次安装速度慢的问题,包含工具链等文件
- Delphi 12 控件之 ios,android,mswindows获取设备唯一标识符和mac地址.rar
- 基于EasyX和C语言的植物大战僵尸简易游戏源码(可作课设).zip
- c++-设计模式之装饰模式(Decorator)
- 2023-2024学年综合素质测评分(最终版).zip
- C#winform SW工程图文件批量导出为.DWG/.PDF.JPG格式
- 基于Pyqt5+python开发的智能小车上位机程序源码(支持MySQL数据库连接).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功