Sites documentation suggest using initial data fixtures which are deprecated in 1.7
|Reported by:||scibi||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently django.contrib.sites documentation suggest to use initial data fixtures to setup correct name and domain for the project (https://docs.djangoproject.com/en/dev/ref/contrib/sites/):
post_migratesignal handler which creates a default site named
example.comwith the domain
example.com. This site will also be created after Django creates the test database. To set the correct name and domain for your project, you can use an initial data fixture.
However automatic loading of fixtures has been deprecated in Django 1.7: https://docs.djangoproject.com/en/dev/howto/initial-data/#automatically-loading-initial-data-fixtures
It would be nice if there was a description in the documentation how to setup sites configuration with migrations. I tried achieving this but without success - referring to
Site model from
sites in migration of some app leads to:
LookupError: No installed app with label 'sites'.