2016-12-20 16:43:52 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2017-12-08 02:15:27 +00:00
|
|
|
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]:
|
2016-12-21 16:36:31 +00:00
|
|
|
if getattr(cls, 'initial'):
|
|
|
|
cls.initial()
|
2016-12-20 16:43:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
def generate_fake():
|
|
|
|
for cls in [User, UserGroup]:
|
2016-12-21 16:36:31 +00:00
|
|
|
if getattr(cls, 'generate_fake'):
|
|
|
|
cls.generate_fake()
|