๐Ÿ“ Django

manage.py: Django commands

P
Author
PyLand Team
๐Ÿ“…
Published
30.06.2026
โฑ๏ธ
Reading time
1 min
๐Ÿ‘๏ธ
Views
291
๐ŸŒฑ
Level
Beginner

manage.py is Django’s command-line utility. Every interaction with a project goes through it.

Core commands

# Start the development server
python manage.py runserver
python manage.py runserver 0.0.0.0:8000  # accessible on the network

# Migrations
python manage.py makemigrations          # create migration files
python manage.py migrate                 # apply migrations
python manage.py showmigrations          # status of all migrations

# Create an application
python manage.py startapp blog

# Superuser
python manage.py createsuperuser

# Interactive shell
python manage.py shell
python manage.py dbshell                 # SQL console

# Static files
python manage.py collectstatic           # collect static files into STATIC_ROOT

makemigrations vs migrate

# makemigrations โ€” only creates migration files (does not apply them)
python manage.py makemigrations tasks
# โ†’ tasks/migrations/0001_initial.py

# migrate โ€” applies migrations to the database
python manage.py migrate
# โ†’ Applied tasks.0001_initial

shell โ€” working with the ORM in the console

python manage.py shell
# Inside the shell
from tasks.models import Task

Task.objects.all()
Task.objects.create(title="First task", status="todo")
Task.objects.filter(status="todo").count()

Checking the project

python manage.py check          # check configuration
python manage.py check --deploy # check production readiness

Tests

python manage.py test                    # run all tests
python manage.py test tasks              # tests for a specific app
python manage.py test tasks.tests.TaskModelTest

Your reaction to the article

๐Ÿ’ฌ Comments (0)

๐Ÿ” Sign in to leave a comment
๐Ÿšช Login
๐Ÿ’ญ

No comments yet

Be the first to share your opinion about this article!

๐Ÿ”— Similar

Similar articles

Continue learning with these materials

๐Ÿ“

Search in Django

You can start with simple Django ORM filters and move to PostgreSQL features when you...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 279
๐Ÿ“

Swagger Documentation with drf-spectacular

drf-spectacular generates an OpenAPI 3.0 schema and Swagger UI for DRF.

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 563
๐Ÿ“

settings.py: Django Configuration

settings.py is the central configuration file for a Django project.

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 315
๐ŸŽ“ Continue learning

Courses that cover this material

Visit the course to apply this material in practice.

Django RequestLab: from HTTP to secure production Open course curriculum