django学习资源

django学习资源

B站视频、常用命令


一、B站视频

Django学习:https://www.bilibili.com/video/BV1JE411V7xk?p=21
https://www.bilibili.com/video/BV1i7411e7CY?p=15
html+css学习:https://www.bilibili.com/video/BV14J4114768?p=6

二、Django实战入门

1.基本命令

创建项目:django-admin startproject 项目名称
启动项目:python manage.py runserver
停止运行项目:Ctrl + C
app的创建和注册:python manage.py startapp app名称
settings.py文件中添加

django学习资源
迁移数据库:
python manage.py makemigrations
python manage.py migrate

2.使用ORM

django学习资源
django学习资源

3.网页资源

bootcss.com
jq22.com

4.PyCharm代码批量替换

Ctrl + R
django学习资源

5.form表单注意的点

django学习资源

6.request

django学习资源

7.使用Mysql数据库的流程

django学习资源

8.模板的语法

return render(request, ‘details.html’, {‘all_text’: all_text})
{{ all_text }}
{% for i in all text %}

{% endfor %}

9.文件上传

file参考:https://blog.csdn.net/dixian4894/article/details/102209166
django学习资源