auto_cmdb--01之models.py建表
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了auto_cmdb--01之models.py建表,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4499字,纯文字阅读大概需要7分钟。
内容图文
![auto_cmdb--01之models.py建表](/upload/InfoBanner/zyjiaocheng/461/7d3f0f263273446496a323cb7993a6ae.jpg)
‘PASSWORD‘: ‘123456‘,
‘HOST‘: ‘10.10.20.134‘,
‘PORT‘: ‘‘
}
}
3.models.py建立表结构
使用python manage.py migrate
报错:ImportError: No module named rest_framework
处理:pip install djangorestframework
报错:ImportError: No module named daterange_filter
处理:pip install django-daterange-filter
报错:ImportError: No module named import_export
处理:pip install django-import-export
[root@jy-xxxx auto_cmdb]# python manage.py migrate
System check identified some issues:
WARNINGS:
app01.ApiAuth.users: (fields.W340) null has no effect on ManyToManyField.
app01.Asset.cabinet_order: (fields.W122) ‘max_length‘ is ignored when used with IntegerField
HINT: Remove ‘max_length‘ from field
app01.Maintainence.maintain_type: (fields.W122) ‘max_length‘ is ignored when used with IntegerField
HINT: Remove ‘max_length‘ from field
app01.NIC.ipaddr: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
HINT: Use GenericIPAddressField instead.
app01.Server.software: (fields.W340) null has no effect on ManyToManyField.
app01.Software.types: (fields.W122) ‘max_length‘ is ignored when used with IntegerField
HINT: Remove ‘max_length‘ from field
Operations to perform:
Synchronize unmigrated apps: django_filters, staticfiles, messages, daterange_filter, import_export, rest_framework
Apply all migrations: admin, contenttypes, app01, auth, sessions
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying app01.0001_initial... OK
Applying app01.0002_auto_20141110_0740... OK
Applying app01.0003_auto_20141110_0754... OK
Applying app01.0004_auto_20141117_0848... OK
Applying app01.0005_auto_20141118_0917... OK
Applying app01.0006_server_software... OK
Applying app01.0007_auto_20141119_0741... OK
Applying app01.0008_auto_20141120_0137... OK
Applying app01.0009_auto_20141120_0317... OK
Applying app01.0010_auto_20141120_0556... OK
Applying app01.0011_auto_20141120_0725... OK
Applying app01.0012_auto_20141120_0916... OK
Applying app01.0013_cpu_parent_sn... OK
Applying app01.0014_auto_20141121_0625... OK
Applying app01.0015_auto_20141121_0627... OK
Applying app01.0016_auto_20141124_0240... OK
Applying app01.0017_auto_20141124_0333... OK
Applying app01.0018_auto_20141124_0520... OK
Applying app01.0019_auto_20141124_0820... OK
Applying app01.0020_asset_hostname... OK
Applying app01.0021_auto_20141124_1116... OK
Applying app01.0022_auto_20141125_0927... OK
Applying app01.0023_auto_20141125_1126... OK
Applying app01.0024_auto_20141126_0150... OK
Applying app01.0025_auto_20141126_0154... OK
Applying app01.0026_auto_20141126_0502... OK
Applying app01.0027_auto_20141126_0516... OK
Applying app01.0028_auto_20141126_0924... OK
Applying app01.0029_auto_20141201_2033... OK
Applying app01.0030_eventlog... OK
Applying app01.0031_server_manufactory... OK
Applying app01.0032_eventlog_create_at... OK
Applying app01.0033_server_model... OK
Applying app01.0034_auto_20141203_1450... OK
Applying app01.0035_remove_asset_sn... OK
Applying app01.0036_auto_20141203_1651... OK
Applying app01.0037_auto_20141204_0857... OK
Applying app01.0038_auto_20141204_0901... OK
Applying app01.0039_auto_20141204_1524... OK
Applying app01.0040_auto_20141204_1833... OK
Applying app01.0041_auto_20141204_1935... OK
Applying app01.0042_auto_20141204_2315... OK
Applying app01.0043_asset_asset_op... OK
Applying app01.0044_auto_20141205_2004... OK
Applying app01.0045_auto_20141205_2241... OK
Applying app01.0046_auto_20141205_2249... OK
Applying app01.0047_auto_20141219_0908... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying sessions.0001_initial... OK
大功告成!
本文出自 “随便写写” 博客,请务必保留此出处http://fangniu.blog.51cto.com/8773628/1744278
auto_cmdb--01之models.py建表
标签:python cmdb
本文系统来源:http://fangniu.blog.51cto.com/8773628/1744278
内容总结
以上是互联网集市为您收集整理的auto_cmdb--01之models.py建表全部内容,希望文章能够帮你解决auto_cmdb--01之models.py建表所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。