lundi 22 décembre 2014

Django 1.7 makemigrations for test models

I have a Django app with tests inside its tests folder. The tests have their own models.py too. How can I make migrations for the test model? Everything was working till I made migrations for the app itself. I think it expects to find migrations for the test model now.


App structure:



|______init__.py
|____migrations
| |____0001_initial.py
| |______init__.py
|____models.py
|____settings.py
|____tests
| |______init__.py
| |____models.py <---
| |____tests.py


Error:



django.db.utils.ProgrammingError: (1146, "Table 'test_db.mytestmodel' doesn't exist")


When running:



./manage.py test tagging

Aucun commentaire:

Enregistrer un commentaire