I’m creating a Django website that uses the bundled auth app to create user accounts.
During development, sometimes I want to create user accounts and then delete them. However, when I try to delete a user account using the Django shell, I get the following error:
DatabaseError: no such table: auth_message
The code is running on a server with Python 2.5 and Django 1.2.1. I wrote the code (and ran syncdb) on my local machine, which is running Python 2.6 and Django 1.4 alpha.
Make sure you’ve added:
django.contrib.messages.middleware.MessageMiddlewareanddjango.contrib.auth.middleware.AuthenticationMiddlewareto the MIDDLEWARE_CLASSES in your settings.py filedjango.contrib.authanddjango.contrib.messagesto the INSTALLED_APPS in your settings.py fileIf that doesn’t work, it’s possible you’ve somehow messed up your database, and if you don’t have too much information already stored you could try clearing it and remaking it using
python manage.py syncdb