How to populate django django_site table in yambler?

I am trying to populate a table django_site

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 am following the Django doc on how to do this. I also know what the model django_site

is in django/contrib/sites/models.py

. The exception I get 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?

+2


source to share


1 answer


You don't need the entire module path, just the name of the application. So this should be



model: sites.site

      

+4


source







All Articles