문제

I'm trying to load fixture:

python manage.py loaddata stock/fixtures/initial_data.json

But error occurred without traceback (I don't know which model is the problem):

ValueError: Problem installing fixture 'stock/fixtures/initial_data.json': The database backend does not accept 0 as a value for AutoField.

How get the traceback?

도움이 되었습니까?

해결책

There's a --traceback option.

python manage.py loaddata stock/fixtures/initial_data.json --traceback

This isn't mentioned in the loaddata docs, it's part of the default command options.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top