1 ===
2 settings.py
3 ===
4 """
5 Django settings for djangoProject project.
6
7 Generated by 'django-admin startproject' using Django 3.1.7.
8
9 For more information on this file, see
10 https://docs.djangoproject.com/en/3.1/topics/settings/
11
12 For the full list of settings and their values, see
13 https://docs.djangoproject.com/en/3.1/ref/settings/
14 """
15
16 from pathlib import Path
17
18 # Build paths inside the project like this: BASE_DIR / 'subdir'.
19 BASE_DIR = Path(__file__).resolve().parent.parent
20
21
22 # Quick-start development settings - unsuitable for production
23 # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
24
25 # SECURITY WARNING: keep the secret key used in production secret!
26 SECRET_KEY = 'k=7p-k#la7jyd*$owq33(ja4t$r%%a4r!0^=y=pleybr##q(f+'
27
28 # SECURITY WARNING: don't run with debug turned on in production!
29 DEBUG = True
30
31 ALLOWED_HOSTS = []
32
33
34 # Application definition
35
36 INSTALLED_APPS = [
37 'django.contrib.admin',
38 'django.contrib.auth',
39 'django.contrib.contenttypes',
40 'django.contrib.sessions',
41 'django.contrib.messages',
42 'django.contrib.staticfiles',
43 ]
44
45 MIDDLEWARE = [
46 'django.middleware.security.SecurityMiddleware',
47 'django.contrib.sessions.middleware.SessionMiddleware',
48 'django.middleware.common.CommonMiddleware',
49 'django.middleware.csrf.CsrfViewMiddleware',
50 'django.contrib.auth.middleware.AuthenticationMiddleware',
51 'django.contrib.messages.middleware.MessageMiddleware',
52 'django.middleware.clickjacking.XFrameOptionsMiddleware',
53 ]
54
55 ROOT_URLCONF = 'djangoProject.urls'
56
57 TEMPLATES = [
58 {
59 'BACKEND': 'django.template.backends.django.DjangoTemplates',
60 'DIRS': [BASE_DIR / 'templates']
61 ,
62 'APP_DIRS': True,
63 'OPTIONS': {
64 'context_processors': [
65 'django.template.context_processors.debug',
66 'django.template.context_processors.request',
67 'django.contrib.auth.context_processors.auth',
68 'django.contrib.messages.context_processors.messages',
69 ],
70 },
71 },
72 ]
73
74 WSGI_APPLICATION = 'djangoProject.wsgi.application'
75
76
77 # Database
78 # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
79
80 DATABASES = {
81 'default': {
82 'ENGINE': 'django.db.backends.sqlite3',
83 'NAME': BASE_DIR / 'db.sqlite3',
84 }
85 }
86
87
88 # Password validation
89 # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
90
91 AUTH_PASSWORD_VALIDATORS = [
92 {
93 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
94 },
95 {
96 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
97 },
98 {
99 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
100 },
101 {
102 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
103 },
104 ]
105
106
107 # Internationalization
108 # https://docs.djangoproject.com/en/3.1/topics/i18n/
109
110 LANGUAGE_CODE = 'en-us'
111
112 TIME_ZONE = 'UTC'
113
114 USE_I18N = True
115
116 USE_L10N = True
117
118 USE_TZ = True
119
120
121 # Static files (CSS, JavaScript, Images)
122 # https://docs.djangoproject.com/en/3.1/howto/static-files/
123
124 STATIC_URL = '/static/'
125
126
127 ===
128 urls.py
129 ===
130 """djangoProject URL Configuration
131
132 The `urlpatterns` list routes URLs to views. For more information please see:
133 https://docs.djangoproject.com/en/3.1/topics/http/urls/
134 Examples:
135 Function views
136 1. Add an import: from my_app import views
137 2. Add a URL to urlpatterns: path('', views.home, name='home')
138 Class-based views
139 1. Add an import: from other_app.views import Home
140 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
141 Including another URLconf
142 1. Import the include() function: from django.urls import include, path
143 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
144 """
145 from django.contrib import admin
146 from django.urls import path
147
148 urlpatterns = [
149 path('admin/', admin.site.urls),
150 ]
151
152
153 ===
154 asgi.py
155 ===
156 """
157 ASGI config for djangoProject project.
158
159 It exposes the ASGI callable as a module-level variable named ``application``.
160
161 For more information on this file, see
162 https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
163 """
164
165 import os
166
167 from django.core.asgi import get_asgi_application
168
169 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings')
170
171 application = get_asgi_application()
172
173
174 ===
175 wsgi.py
176 ===
177 """
178 WSGI config for djangoProject project.
179
180 It exposes the WSGI callable as a module-level variable named ``application``.
181
182 For more information on this file, see
183 https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
184 """
185
186 import os
187
188 from django.core.wsgi import get_wsgi_application
189
190 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings')
191
192 application = get_wsgi_application()
===
manage.py
===
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv) if __name__ == '__main__':
main()
#xx.html
### <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body> </body>
</html>

djangoProject default codes的更多相关文章

  1. JS 条形码插件--JsBarcode 在小程序中使用

    在小程序中的使用: utils文件夹下 barcode.js 粘粘以下代码 var CHAR_TILDE = 126 var CODE_FNC1 = 102 var SET_STARTA = 103 ...

  2. 微信小程序-携带参数的二维码条形码生成

    demo文件目录 index.js文件 //index.js var wxbarcode = require('../../utils/index.js'); Page({ data: { code: ...

  3. Disabling default console handler in Java Logger by codes

    The open source packages usu. relies on log4j or Java Logger to print logs, by default the console h ...

  4. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  5. Bar codes in NetSuite Saved Searches(transport/reprint)

    THIS IS A COPY FROM BLOG Ways of incorporating Bar Codes into your Netsuite Saved Searches.    Code ...

  6. A Free , Fast and Small Automatic Formatter for C , C++ , C# , Java Source Codes

    A Free , Fast and Small Automatic Formatterfor C , C++ , C# , Java Source Codes Indenting source cod ...

  7. storm报错:Exception in thread "main" java.lang.RuntimeException: InvalidTopologyException(msg:Component: [mybolt] subscribes from non-existent stream: [default] of component [kafka_spout])

    问题描述: storm版本:1.2.2,kafka版本:2.11.   在使用storm去消费kafka中的数据时,发生了如下错误. [root@node01 jars]# /opt/storm-1. ...

  8. LDAP Error Codes

    Error / Data Code Error Description 0 LDAP_SUCCESS Indicates the requested client operation complete ...

  9. Constructor Overloading in Java with examples 构造方法重载 Default constructor 默认构造器 缺省构造器 创建对象 类实例化

    Providing Constructors for Your Classes (The Java™ Tutorials > Learning the Java Language > Cl ...

随机推荐

  1. SpringBoot | 3.2 整合MyBatis

    目录 前言 1. 导入MyBatis场景 1.1 初始化导向 1.2 手动导入 2. *MyBatis自动配置原理 3. 全局配置文件 @Mapper @MapperScan 3.1 配置模式 3.2 ...

  2. 从Python到Go:初学笔记

    本文记录了我在学习Go的过程时的一些笔记,主要是比较Python和Go之间的差异并作简单描述,以此使Python程序员对Go语言的特性有简略的了解.初学难免有纰漏,欢迎各位批评指正补充交流,谢谢. 数 ...

  3. VNC远程重装CentOS7

    适用于云服务器,远程安装纯净版的CentOS7.9 脚本执行完成后使用VNC客户端连接 一键重装脚本 #!/bin/bash #Net Reinstall Centos System red='\03 ...

  4. Create Shortcut to Get Jar File Meta Information

    You have to get meta information of cobertura.jar with command "unzip -q -c cobertura.jar META- ...

  5. Linux 鸟叔的私房菜--完全结束

    2018年10月22日 我不想再拖下去了,一本书看不完就无法进行下一本书的阅读,可能算是我的一个强迫症(借口吧) 之前看05年第一版<鸟叔的Linux私房菜>停在脚本语言那里,迟迟没有前进 ...

  6. JavaWeb项目实战-油画商城

    整个项目都已经上传到github-mmgallery上,供有需要的读者使用,主要文件来自于csdn,区别是csdn中的项目数据存储在MySQL中,本项目数据存储在Xml文件中.课件和学习视频课程来自M ...

  7. 如何快速方便的生成好看的接口文档(apipost生成文档)

    一键生成文档 我们在"2分钟玩转APIPOST"一讲中,简单介绍了如何生成并分享接口文档: 点击分享文档 复制并打开文档地址就可以看到了完整的接口文档. 本节课主要是讲解一些需要注 ...

  8. linux中文件内核数据结构

    3.文件io 3.1 文件内核数据结构 3.2 复制文件描述符的内核数据结构 3.3 对指定的描述符打印文件标志 #include "apue.h" #include <fc ...

  9. MeteoInfo-Java解析与绘图教程(三)

    MeteoInfo-Java解析与绘图教程(三) 上文我们说到简单绘制色斑图(卫星云图),但那种效果可定不符合要求,一般来说,客户需要的是在地图上色斑图的叠加,或者是将图片导出分别是这两种效果 当然还 ...

  10. NOIP 模拟 $34\; \rm Merchant$

    题解 \(by\;zj\varphi\) 对于选的物品,总值一定有在前一段区间递减,后一段递增的性质,那么就可以二分. check()时只递归归并大的一段,用nth_element即可 Code #i ...