From db2c1d3511894f042374c57c31b84c14eaec3634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Sun, 26 Nov 2017 02:27:46 +0100 Subject: [PATCH] Allow dot in app_label --- autofixture/management/commands/loadtestdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autofixture/management/commands/loadtestdata.py b/autofixture/management/commands/loadtestdata.py index 7ea1e99..a092475 100644 --- a/autofixture/management/commands/loadtestdata.py +++ b/autofixture/management/commands/loadtestdata.py @@ -192,8 +192,8 @@ def handle(self, *attrs, **options): models = [] for attr in attrs: try: - app_label, model_label = attr.split('.') - model_label, count = model_label.split(':') + app_label, model_label = attr.rsplit('.', 1) + model_label, count = model_label.rsplit(':', 1) count = int(count) except ValueError: raise CommandError(