Emile
Emile

Reputation: 3484

Django 1.9 ImportError when running migrate, but not runserver

I'm trying to run a new migration on a new Django 1.9 project but I'm getting an ImportError that seems to conflict with runserver. I'm running these commands from the <project> directory which includes the manage.py file.

Details:

Commands & Error:

$ django-admin.py migrate --settings=config.settings.local
.....
ImportError: No module named config.settings.local



$ python manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

January 09, 2016 - 13:33:32
Django version 1.9, using settings 'config.settings.local'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Any ideas? Thanks in advance!

Upvotes: 1

Views: 704

Answers (1)

Alasdair
Alasdair

Reputation: 308999

Use manage.py instead of django-admin.py

python manage.py migrate --settings=config.settings.local

Upvotes: 2

Related Questions