栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

xadmin安装

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

xadmin安装

1.xadmin的下载

源码包下载地址:

GitHub - sshwsfc/xadmin at django2

2 .在工程项目根目录中执行一下命令 下载依赖

$ pip install -r requirements.txt

3. 修改base.py ( python 3.8 以上的版本,以下的不用)

 

# >

new_attrs = {'__module__': module}

classcell = attrs.pop('__classcell__', None)

if classcell is not None:

new_attrs['__classcell__'] = classcell

new_class = super_new(cls, name, bases, new_attrs)

# >

4 自己的数据库模型类,完成数据库迁移

python manage.py makemigrations

python manage.py migrate

5.添加管理员

$ python manage.py createsuperuser

6.启动

$ python manage.py runserver

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/268582.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号