We could now jump into our views and begin optimizing our webpages there. Before we do, however, I want to draw your attention to our migration files.
By default, when you run tests (when, not if) Django creates a new database based on migrations files. Despite living in memory, this process can be quite time consuming. A fun exercise for learning to optimize code is to take the code in our migrations and attempt to speed them up. This exercise also provides the opportunity for us to use the
It is possible to disable migrations during tests. If you have a large number of migrations, disabling them for your tests may be advisable.
When we programmed our
Tag data migration in ...