DEV Community

Discussion on: Testing against unmanaged models in Django

Collapse
 
sdolemelipone profile image
Mark G

I found a much simpler method via Vitor's blog at simpleisbetterthancomplex.com/tips... If you put your unmanaged database models in a different app to your managed ones, you can set

MIGRATION_MODULES = {'my_unmanaged_app': None}

in settings.py. All the relevant tables and columns will be created for testing, but no migrations are necessary.