1👍
✅
There’s a settings variable you can use called FIXTURE_DIRS
. In Django 1.6, this is a list of the directories that will be searched for fixtures, in addition to any directory called ‘fixtures’ in the root of the app. FIXTURE_DIRS
is an empty tuple by default.
You can’t prevent the ‘fixtures’ directory being searched, so make sure you don’t have a directory by that name. Instead, create a directory for your fixtures and give it any other name. I’ll call mine ‘my-fixtures’ in the example below.
Now since you’ve already checked whether or not DEBUG
is true, you can add two lines to the end of settings.py
:
if DEBUG:
FIXTURE_DIRS = ['my-fixtures']
Source:stackexchange.com