2023-12-12 18:14:34 +00:00
|
|
|
from yamdl.loader import ModelLoader
|
|
|
|
|
|
|
|
class CustomYamdlLoader(ModelLoader):
|
|
|
|
def load_fixture(self, model_class, data, file_path):
|
2023-12-12 18:22:37 +00:00
|
|
|
if file_path.suffix not in self.EXT_YAML:
|
|
|
|
data["slug"] = file_path.stem
|
|
|
|
|
2023-12-12 18:14:34 +00:00
|
|
|
super().load_fixture(model_class, data, file_path)
|
2024-03-31 14:20:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
def show_debug_toolbar(request):
|
|
|
|
return True
|