jumpserver/apps/users/models/utils.py

19 lines
349 B
Python
Raw Normal View History

2016-12-20 16:43:52 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from .user import User
from .group import UserGroup
2016-12-20 16:43:52 +00:00
2017-04-04 03:14:59 +00:00
def init_model():
2016-12-20 16:43:52 +00:00
for cls in [User, UserGroup]:
if getattr(cls, 'initial'):
cls.initial()
2016-12-20 16:43:52 +00:00
def generate_fake():
for cls in [User, UserGroup]:
if getattr(cls, 'generate_fake'):
cls.generate_fake()