Reputation: 8937
I want to add the sites to the dependencies for one of my data migration.
class Migration(migrations.Migration):
dependencies = [
('jianguo', '0004_auto_20141006_1534'),
('django.contrib.sites', '__first__'),
]
operations = [
migrations.RunPython(create_site)
]
But I got
ValueError: Dependency on unknown app: django.contrib.sites
Anyone did this before? Thanks.
Upvotes: 1
Views: 927
Reputation:
Just ran into the same problem. Apparently you have to omit the 'django.contrib.' when referring to models/apps from the django.contrib
name space.
Replace 'django.contrib.sites'
=> 'sites'
when referring to the django.contrib.sites
in dependencies
or when using apps
.
Upvotes: 1