Print debug messages while import
This commit is contained in:
parent
f1eaedbd14
commit
1460664145
1 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import django.db.utils
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.apps import apps
|
||||
|
||||
|
@ -401,7 +402,14 @@ class Command(BaseCommand):
|
|||
try:
|
||||
m = _model(**_object_dict)
|
||||
m.save()
|
||||
except django.db.utils.IntegrityError as ex1:
|
||||
error_row_count += 1
|
||||
print(str(ex1))
|
||||
print("**********************")
|
||||
print(str(_object_dict))
|
||||
print("**********************")
|
||||
except Exception as ex:
|
||||
error_row_count += 1
|
||||
print('-----')
|
||||
print(str(ex))
|
||||
print('----------------')
|
||||
|
|
Loading…
Reference in a new issue