大家好,我是编程小6,很高兴遇见你,有问题可以及时留言哦。
系统变量-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
D:\soft\python310\Scripts\django-admin startproject devops
python manage.py runserver
http://127.0.0.1:8000/
python manage.py startapp at
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')),
python manage.py makemigrations at
python manage.py sqlmigrate at 0001
//sqlmigrate 命令接收一个迁移的名称,然后返回对应的SQL
python manage.py migrate
python manage.py createsuperuser
http://127.0.0.1:8000/admin/ renjian01/123456a?
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
1、下载
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