tags:

views:

143

answers:

1

I'm trying to populate the django_site table in my test database with the following yaml content:

- model: django.contrib.sites.site
  pk: 1
  fields:
    domain: stackoverflow.com
    name: Stack Overflow

- model: django.contrib.sites.site
  pk: 2
  fields:
    domain: serverfault.com
    name: Server Fault

I'm following the Django doc on how to do the above. I also know that django_site model is located in django/contrib/sites/models.py. The exception that I am getting from the above after running python manage.py test myapp is:

DeserializationError: Invalid model identifier: 'django.contrib.sites.site'

Any ideas what I might be missing?

A: 

You don't need the whole module path, just the app name. So it should be

model: sites.site
Daniel Roseman