|
I am trying to reset a django app with the usual command python2.6 manage.py reset *app_name*, and I get the following error:
Also if I try a full reset of the db using manage.py flush, I get the same "db not configured correctly" error. Any suggestions? I never have had this problem with the same app running local using sqlite3. PS Not sure if this is connected to the problem or what it even means really, but for some of my table fields' id columns, the sqlall returns "DEFERRABLE INITIALLY DEFERRED". |
|
the reset command is deprecated. if you are using south, I wrote a management command for what you need: http://balzerg.blogspot.co.il/2012/09/django-app-reset-with-south.html |
Did you try the
sqlresetcommand as it says in the error message? If so, what was the output?It says that my DJANGO_SETTINGS_MODULE is not defined. I found a solution on a forum for this error by adding:
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings'
..to the init.py function of the app, which I tried but didnt seem to have any effect.
Ah! Running from the command line won't set DJANGO_SETTINGS_MODULE and neither will adding it to your app.
You should be able to do this:
Excellent, worked like a charm thanks!!