示例#1
0
 def clone(self):
     # Clone db_types state as well
     new_state = super_patchy()
     new_state.db_types = self.db_types.copy()
     if 'apps' in self.__dict__:  # hasattr would cache the property
         new_state.apps.db_types = self.apps.db_types.copy()
     return new_state
示例#2
0
 def generate_created_models(self, *args, **kwargs):
     super_patchy(*args, **kwargs)
     self.detect_enums()
示例#3
0
 def __init__(self, *args, **kwargs):
     super_patchy(*args, **kwargs)
     self.db_types = {}
示例#4
0
 def __init__(self, *args, db_types=None, **kwargs):
     self.db_types = db_types or {}
     super_patchy(*args, **kwargs)