Reputation: 71
Is it possible to access the Django settings from a migration? I'm attempting to load large data files (not fixtures within my project) into my database via a data migration. I would like the root directory of the data files to be configurable and the ability to read the path of the root directory from within my migration.
Upvotes: 7
Views: 3446
Reputation: 10619
in you migration file type:
from django.conf import settings
now you have access to your settings
Upvotes: 5