python相关cmdb系统

1、

Django:之CMDB资源系统

https://www.cnblogs.com/wulaoer/p/5436866.html

https://github.com/triaquae/MadKing

https://blog.csdn.net/weixin_33826609/article/details/93870683

https://github.com/zutianbiao/baize

2、

django—创建simplecmdb项目(1)

https://blog.51cto.com/huangzp/2089705

(1)修改时区和语言可能会报错

(2)修改modle.py

# ip = models.IPAddressField()
    ip = models.GenericIPAddressField

(3).检查数据库是否存在语法错误,查看要执行的脚本语句,同步数据库

python manage.py check hostinfo
python manage.py makemigrations hostinfo
python manage.py migrate

python manage.py sqlmigrate hostinfo 0001

(4)django 创建登陆后台的管理员

python3 manage.py createsuperuser

(5)运行程序

python manage.py runserver 127.0.0.1:8000

3、创建教程
http://liujiangblog.com/course/django/127

4、pycharm 的pip源

https://www.cnblogs.com/Dicky-Zhang/p/7383744.html

5、python获取windows软件安装列表

https://blog.51cto.com/11072687/1752445

 6、pycharm系统的python命令调用cmd命令显示乱码问题解决方法

https://www.jb51.net/article/168352.htm

7、python获取windows系统信息

*******************************************************************************

#!D:Django工程simplecmdbpython
# -*- coding:utf-8 -*-
import socket
import platform
import os
import ast
hostname1=socket.gethostname()
ipaddr=socket.gethostbyname(hostname1)



print(hostname1)
print("您当前的ip地址为: "+ipaddr)
print("操作系统名称及版本号::: "+platform.platform())
print(platform.uname())
print("您的操作系统序列号为:")
sn=os.system("systeminfo | findstr ID")
#os.system是无法获取返回值的。当运行结束后接着往下面执行程序。
#https://blog.csdn.net/ever_peng/article/details/80088994
#OS.popen带返回值的,如何获取返回值

print("。。。。。。。。。。。。。。。")
IDDR = os.popen('systeminfo | findstr ID')
print("切割的操作系统序列号为::")
#print (IDDR.read())
#print(type(IDDR))
#print(IDDR.read().split()[2])
#https://blog.csdn.net/txwsmsm7023_/article/details/100751064
sn=IDDR.read().split()[2]
print(sn)

#changshang=os.popen('systeminfo')
#print(changshang)
os.system("systeminfo | findstr 系统制造商")
cs=os.popen("systeminfo | findstr 系统制造商")
print("制造厂商为:"+cs.read().split()[1])
#cs1=cs.read().split()[1]
#print(cs1)

**************************************************************************************

原文地址:https://www.cnblogs.com/yaok430/p/11491200.html