Can someone please explain what KeyError: 'default' means?

This is the first time I have tried Django 1.7 and without doing any migrations all I have done here is this ...

(xxex3) C:\Users\mike\env\xxex3\ssds>copy substance\fixtures\test_data.json substance\fixtures\initial_data.json

(xxex3) C:\Users\mike\env\xxex3\ssds>python manage.py test --settings=ssds.settings.test --verbosity=1 common refer substance company workplace credit

Python:   3.4
Django:   1.7.7
17:40:04
SQLite3:  memory

Creating test database for alias 'default'...
Traceback (most recent call last):
File "C:\Users\mike\env\xxex3\lib\site-packages\django\contrib\contenttypes\models.py", line 19, in get_by_natural_key
    ct = self.__class__._cache[self.db][(app_label, model)]
KeyError: 'default'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
File "C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\sqlite3\base.py", line 485, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: django_content_type

(there is more but the bottom line is ...)

    return Database.Cursor.execute(self, query, params)
django.core.serializers.base.DeserializationError: Problem installing fixture 'C:\Users\ mike\env\xxex3\ssds\substance\fixtures\initial_data.json': no such table: django_content_type

(xxex3) C:\Users\mike\env\xxex3\ssds>

From my settings ...

SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'

#CACHES = {
#    'default': {
#        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
#    }
#}

The same error occurs whether CACHES is commented out or not.

Not sure where to look in the documentation. https://docs.djangoproject.com/en/1.7/topics/http/sessions/ got me thinking (out of my depth) about sessions and serialization.

It seems Django 1.7 (or maybe 1.8) removes the 'name' column from content_types upon migration and the migrated tables crash Django 1.6 (naturally I suppose). That means I'm stuck on 1.6 until I can get things going on 1.7 and/or 1.8.

Is it possible to run with 1.7 without migrating the Django apps?

Any help will be much appreciated

Thanks

Mike


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55227F50.3050608%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to