Thales
unread,Aug 6, 2010, 10:55:33 AM8/6/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi everybody,
I am working in a project using django, which has about 20 apps's.
There is no tests written and It was decided that tests would have to
be written for the whole project.
To start testing, I runned:
"python manage.py test"
And a database was created, tables and stuff... But one table wasnt
created, so I got this error:
"Error: Database test_febrace couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the
SQL this command wasn't able to run.
The full error: (1146, "Table 'test_febrace.submissao_projeto'
doesn't exist")"
Trying to discover what the problem was, I deleted all my tables and
runned:
"python manage.py syncdb"
And... 2 of the tables weren't created in my mysql database. Both of
them are from the same app, which has other models and the other
models tables were succesfully created.
I tryed
"python manage.py sqlall *appname*" and I executed the returned sql
statements in my mysql server, so the tables were created.
Any suggestion? For the project, it is ok to create manually executing
the sqlall commands for me, but this way I cant test.
Thank you!