Пример #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)