pycharm创建django项目的sitting配置“”"Django settings for Django project.Generated by ‘django-admin startproject’ using Django 2.2.For more information on this file, seehttps://docs.djangoproject.com/en/2.2/topics/settings/For the full list of settings and t
摘要由CSDN通过智能技术生成
pycharm创建django项目的setting配置
"""
Django settings for Django project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/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.2/howto/deployment/checklist/# SECURITY WARNING: keep the secret key used in production secret!# 用于签名加密
SECRET_KEY ='@z$ck)-0nb&z6tnb+bnkk)vyz7ttdfr*r56#3$++-t@)b!==a-'# SECURITY WARNING: don't run with debug turned on in production!# DEBUG是指调试模式,项目上线前必须改为False, 改为False找不到静态目录static
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',# 把自己的应用进行安装,往下添加'app',# 一些常用的路由,视图函数的设置,模板,模型,过滤器等'app01',# 登录注册功能,用cookie或者session保存用户信息,创建表单验证注册格式'app02',# 后台管理功能,主要配置在app02:admin下, 使用前数据库配置换成admin'rest_framework',# DRF框架,需要先 pi
pycharm创建django项目的sitting配置“”"Django settings for Django project.Generated by ‘django-admin startproject’ using Django 2.2.For more information on this file, seehttps://docs.djangoproject.com/en/2.2/topics/settings/For the full list of settings and t