Thursday, October 28, 2010

Re: Database error: Table 'test_XXX.django_content_type' doesn't exist

On Thu, Oct 28, 2010 at 1:27 AM, girish shabadimath
<girishmss.1203@gmail.com> wrote:
> Hi all,
> im using django 1.2
> there are two databases involved in my project (default and XYZ (used only
> for migration))
> i use a consistant MySQL storage type for all apps, all models (including
> m2m).
> This is done by registering a post-syncdb  signal in management.py
> file which converts all tables to innodb.
> (code partially taken from:
> http://code.djangoproject.com/wiki/AlterModelOnSyncDB )
> (Description of management.py magic is at
> http://code.djangoproject.com/wiki/Signals)
>
> i wrote few tests for one of my application,
> when i run ./manage.py test following error occurs:
> DatabaseError: (1146, "Table 'test_XXX.django_content_type' doesn't exist")
> any clues?

I wager if you do a syncdb to another database (as test is doing for
you) you'll find that the table 'django_content_type' does indeed not
exist. Possibly because you don't have 'django.contrib.contenttypes'
in INSTALLED_APPS.

--
Frank Wiles
Revolution Systems | http://www.revsys.com/
frank@revsys.com   | (800) 647-6298

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment