发布时间:2026-07-25阅读(0)
系统变量-path 添加:
D:\soft\python310\python.exe
D:\soft\python310\Scripts

https://dev.mySQL.com/downloads/installer/
D:\soft\MySql8\MySQLServer 8.0\bin\
添加到系统变量中mysql.exe
改为mysql8.exe
mysql8 -uroot -P 3308 -p L@20220403
WIN R services.msc
二、Django初始配置1、创建项目D:\soft\python310\Scripts\django-admin startproject devops
python manage.py runserver
http://127.0.0.1:8000/
2、创建应用python manage.py startapp at
3、配置DATABASES = {
default: {
ENGINE: django.db.backends.mysql, # 或者使用 mysql.connector.django
NAME: db_at,
USER: root,
PASSWORD: L@20220403,
HOST: localhost,
PORT: 3308,
}
}
DIRS:
[os.path.join(BASE_DIR, templates)],
def hello(request):
context = {hello: Hello World!}
return render(request,
hello.html, context)
<h1>{{ hello }}</h1>
from django.urls import path
from . import views
urlpatterns = [
path( , views.hello, name=hello_name),
]
path(at/, include(at.urls)),
4、创建模型python manage.py makemigrations at
python manage.py sqlmigrate at 0001
//sqlmigrate 命令接收一个迁移的名称,然后返回对应的SQL
python manage.py migrate
5、创建管理员账号python manage.py createsuperuser
http://127.0.0.1:8000/admin/ renjian01/123456a?
6、编写视图1、vscode报错:
Import "django.contrib" could not be
resolved from source
PylancereportMissingModuleSource)
pip list查看是否安装了;设置中搜索python.analysis.extraPaths,再添加项添加包路径:

2、vscode报错:
"include" is not definedPylance
reportUndefinedVariable
添加
from django.urls import path, include
三、Jenkins1、下载
https://www.jenkins.io/download/
下载war包,windows、liunx都可以用。admin/123456a?
2、换源
清华源
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
3、Jenkins 嵌入到 Iframe
https://blog.csdn.net/github_39160845/article/details/108960606
4、安装插件
Blue Ocean

Copyright © 2024 有趣生活 All Rights Reserve吉ICP备19000289号-5 TXT地图HTML地图XML地图