python之自动化(django)

1、安装

我用的是pip install Django 在命令行中安装

然后django-admin startproject autotext(在命令行中)

这句话是创建一个django 项目

然后切换到你所创建项目的目录下

输入:

python manage.py runserver

当你出现以下错误时

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.

Run 'python manage.py migrate' to apply them.

输入:

python manage.py migrate

当你出现语言类错误输入:

set PYTHONIOENCODING=utf-8

出现以下东西证明你的django安装完成:

Watching for file changes with StatReloader

Performing system checks...

System check identified no issues (0 silenced).

March 13, 2024 - 18:41:38

然后你需要在命令行输入:

python manage.py createsuperuser

来创建一个最高权限的超级用户.

最后你可以使用浏览器来进入django

http://127.0.0.1:8000/admin(你的超级用户叫啥那么admin就换成啥就行)

后面的下次再讲反正不少。

相关推荐
ebiobiz2 小时前
基于 GD32 Embedded Builder (GEB) 与 Nimmake 的 MCU 工程搭建指南
c++·python·单片机·嵌入式硬件·mcu
老歌老听老掉牙2 小时前
穿越时空的物流密码:VRP与VRPTW的深度剖析及实战求解
python·物流·vrp
FYKJ_20102 小时前
django电影推荐系统55066-计算机课程设计、毕业设计
vue.js·spring boot·python·mysql·typescript·spark·django
ShyanZh2 小时前
【Python3基础】13-Python 常用设计模式
开发语言·python·设计模式
小静AI工程实验室3 小时前
RSA 算法详解:从模幂原理到 OAEP 加密、PSS 签名与 Python 实验
python·算法
xzal123 小时前
GESP Python笔记
笔记·python·算法
GJGCY3 小时前
企业级智能体如何连接ERP、OA和CRM?API、RPA与MCP的技术分工
ai·自动化·rpa·智能体
半日闲dusknook3 小时前
我给 AI 写了个「音频编译器」:把「听起来还行」变成 PASS/FAIL
python
在世修行4 小时前
干货:信号槽
python·信号槽
Wx-bishekaifayuan4 小时前
springboot生活易购超市管理系统54086-计算机课程设计、毕业设计
spring boot·后端·python·django·课程设计·express·旅游