# Path: chamber/models/handlers.py
# class InstanceOneTimePreCommitHandler(PreCommitHandler):
#     """
#     Use this class to create handler that will be unique per instance and will be called only once per instance.
#     """
# 
#     def _handle(self, instance, **kwargs):
#         pre_commit(InstanceOneTimePreCommitHandlerCallable(self, instance), using=self.using)


from chamber.models.handlers import InstanceOneTimePreCommitHandler
    from .models import TestSmartModel  # NOQA
    from .models import TestFieldsModel  # NOQA
    from .models import TestDispatchersModel  # NOQA
    from .models import CSVRecord  # NOQA
        from .models import TestOnDispatchModel


def create_test_smart_model_handler(instance, **kwargs):

    TestSmartModel.objects.create(name='name')


def create_test_fields_model_handler(instance, **kwargs):

    TestFieldsModel.objects.create()


def create_test_dispatchers_model_handler(instance, **kwargs):

    TestDispatchersModel.objects.create()


def create_csv_record_handler(instance, **kwargs):

    CSVRecord.objects.create()



# Path: chamber/models/handlers.py
# class InstanceOneTimePreCommitHandler(PreCommitHandler):
#     """
#     Use this class to create handler that will be unique per instance and will be called only once per instance.
#     """
# 
#     def _handle(self, instance, **kwargs):
#         pre_commit(InstanceOneTimePreCommitHandlerCallable(self, instance), using=self.using)


# Path: example/dj/apps/test_chamber/handlers.py
from chamber.models.handlers import InstanceOneTimePreCommitHandler
    from .models import TestSmartModel  # NOQA
    from .models import TestFieldsModel  # NOQA
    from .models import TestDispatchersModel  # NOQA
    from .models import CSVRecord  # NOQA
        from .models import TestOnDispatchModel



def create_test_smart_model_handler(instance, **kwargs):

    TestSmartModel.objects.create(name='name')


def create_test_fields_model_handler(instance, **kwargs):

    TestFieldsModel.objects.create()


def create_test_dispatchers_model_handler(instance, **kwargs):

    TestDispatchersModel.objects.create()


def create_csv_record_handler(instance, **kwargs):

    CSVRecord.objects.create()



class OneTimeStateChangedHandler(InstanceOneTimePreCommitHandler):