[Fixture] 修改asset detail

This commit is contained in:
ibuler
2017-04-04 11:14:59 +08:00
parent 97fb2a4fe6
commit ac3553babb
8 changed files with 54 additions and 18 deletions

View File

@@ -2,19 +2,19 @@
# -*- coding: utf-8 -*-
#
from . import IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag
from . import IDC, SystemUser, AdminUser, AssetGroup, Asset
__all__ = ['initial', 'generate_fake']
__all__ = ['init_model', 'generate_fake']
def initial():
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag]:
def init_model():
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset]:
if hasattr(cls, 'initial'):
cls.initial()
def generate_fake():
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag]:
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset]:
if hasattr(cls, 'generate_fake'):
cls.generate_fake()