Using Django 1.7 and the new migration I am having a strange problem.
I divided my settings files into 3 files, which I always did before version 1.7, for example ...
/settings
__init__.py
base.py
development.py
production.py
__ __ INIT. RU
from .base import *
if sys.argv[1] == 'runserver':
from .development import *
else:
from .production import *
Both development.pyand production.pyhave their own settings for the database environment. However, with the new migration, the system performing the migration does not detect anything IF I did not put the database parameters in the files base.py.
Should I change this line as follows:
if sys.argv[1] == 'runserver' or sys.argv[1] == 'migrate':
Or is there a better way?
source
share