I have a fully functional satchmo store running on sqlite3. I need to change to mysql though. Whether I create a new database or port the old database, I get http error 500s in all sorts of places. For example if I have a new db, and I create a user account all seems to be fine. If I then attempt to update the user's profile (which is actually and extended user profile), immediately I get the server 500 error. Its like it just isn't interested in that URL any more (http://127.0.0.1:8000/accounts/update/)
The weird thing is that if I log in as an admin and go to the admin pages, then I can update that user's (extended) profile no problem at all. In fact I've never seen any errors on the admin pages.
Here is how I set it up for mysql:
apt-get install mysql-client
apt-get install mysql-server
apt-get install python-mysqldb
mysql -u root -p
mysql> USE mysql;
mysql> CREATE DATABASE mystore CHARACTER SET utf8;
mysql> GRANT ALL PRIVILEGES ON mystore.* TO storeuser@localhost IDENTIFIED BY 'secret';
mysql> FLUSH PRIVILEGES;
settings.py:
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'mystore'
DATABASE_USER = 'storeuser'
DATABASE_PASSWORD = 'secret'
DATABASE_HOST = ''
DATABASE_PORT = ''
DATABASE_OPTIONS = { "init_command": 'SET NAMES "utf8"' , "init_command":'SET storage_engine=INNODB' , }
Then to create a new db I just did ths:
python manage.py syncdb
python manage.py runserver
Edit 1
Here is the code where it bombs out:
class myExtendedContactInfoForm(ExtendedContactInfoForm):
def __init__(self, *args, **kwargs):
# The following line is where it produces the error
super(myExtendedContactInfoForm, self).__init__(*args, **kwargs)
Edit 2
It seems like there is something missing from the db because if I go back to using a sqlite back-end, and then delete the sqlite db (and then run 'python manage.py syncdb') I get exactly the same symptoms. Seems like I need to do something more than just syncdb.
What am I missing here?