https://code.djangoproject.com/ticket/24524#comment:12
The problem is that the sites code assumed that after being added to
INSTALLED_APPS, a {{{python ./manage.py migrate}}} command would be run to
execute all migrations together - and *then* catch a post-migrate signal
which calls {{{create_default_site}}}. Running individual migrations does
not work when an application is in this state.
It looks like some code is in place to attempt to prevent this error, but
it's either incorrect or not working:
https://github.com/django/django/blob/stable/1.8.x/django/contrib/sites/management.py#L12-L18
The workaround: Issue a {{{python ./manage.py migrate}}} command to exit
this state. However, the workaround shouldn't be necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/27248>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => fixed
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
I believe this is fixed in Django 1.10 by
61a16e02702fff4665969388f3b61af8cb1a20ae. If not, please reopen.
--
Ticket URL: <https://code.djangoproject.com/ticket/27248#comment:1>