Django 6 cheatsheet

Django 6: Testing and checks

6 common Django 6 tasks.

Run the tests

Run every test in the project.

python manage.py test

Run one test

Run a single test method by its dotted path.

python manage.py test blog.tests.PostTests.test_title

Run tests in parallel

Use one process per CPU core.

python manage.py test --parallel

Reuse the test database

Keep the test database between runs to save time.

python manage.py test --keepdb

Check the project for problems

Run Django's system checks.

python manage.py check

Check deployment settings

Run the extra security and production checks.

python manage.py check --deploy

Was this page helpful?