views:

118

answers:

1

I've finally installed all the requirements (so i think!) of a Django project, and I'm trying to get a local install running on my Mac (OSX 10.4).

I'm getting the following error:

Blockquote OperationalError at /
no such table: django_content_type
Request Method: GET
Request URL: http://127.0.0.1:8000/
Exception Type: OperationalError
Exception Value:
no such table: django_content_type
Exception Location: /Users/Diesel/Desktop/DjangoWork/pinax-ev/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py
in execute, line 170
Python Executable: /Users/Diesel/Desktop/DjangoWork/pinax-ev/bin/python
Python Version: 2.5.1

+4  A: 
  • Did you run ./manage.py syncdb to create all your tables?
  • Do you have django.contrib.contenttypes in your INSTALLED_APPS in settings.py?

As an unlikely third option:

  • Does your project/app use the Django app "South"? If so, you would also need to run ./manage.py migrate to make sure all tables get created.

Forgetting any of those items would cause the table(s) for ContentType not to be generated.

Gabriel Hurley
Thanks! I ended figuring out the ./manage.py syncdb to create tables...Although for some reason the "migrate" command isn't available to me... (I'm using sqlite3, but I'm moving to mysql tonight on my local machine).I actually think i do need "South" where can I find that?Thanks!
the `migrate` command is added by South. you can find out more about South here: http://south.aeracode.org/
Gabriel Hurley
Thanks! I had no idea :/