Reputation: 357
I'm running Django 1.4 on Windows 7 in Pycharm and I installed WAMP because I need to have my data in a MySQL table.
This is from setting.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'aidata',
'USER': 'root'
}
}
From installed_apps I uncommented:
'django.contrib.sessions'
Running manage.py syncdb
does not create any tables ( even models) in my mysqldb.
I get the error when trying to acces /admin/
DatabaseError at /admin/
(1146, "Table 'aidata.django_session' doesn't exist")
Upvotes: 7
Views: 9324
Reputation: 5187
I was running into the same problem and for me (running django 1.7 development trunk of mid-sept.2013) it helped to
[app]/migration
)-directoriesINSTALLED_APPS
in settings.pyThat might be due to the shift towards the integrated migration system in django v1.7, but I'm speculating here.
Upvotes: 0
Reputation: 10939
make sure you uncommented this line in your middleware:
MIDDLEWARE_CLASSES = ( .... 'django.contrib.sessions.middleware.SessionMiddleware', )
then try to python manage.py syncdb
.
python manage.py syncdb
now i'm guessing, post up your settings file so i can make meaningful troubleshooting attempts
python manage.py syncdb
my thought is that a pyc file with the sqlLite info may be cached and not regenerating
everything in your settings.py look ok to me. try something for me? create a new django project, don't enable the admin or add in your apps i just want to know if from scratch everything in your django install seems to be working
let me know if the models create properly
Upvotes: 4