📝 Django

manage.py: Django commands

P
Author
Pyland
📅
Published
30.06.2026
⏱️
Reading time
1 min
👁️
Views
81
🌱
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="Первая задача", 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

📝

pytest-django: Testing Django

Охватываемые темы: Installation, @pytest.mark.djangodb, Fixtures, Testing views.

📅 30.06.2026 👁️ 132
📝

Django: Template Tags

Template tags are logic inside HTML. Unlike {{ variable }} which only outputs a value,...

📅 30.06.2026 👁️ 84
📝

Django: Static Files

Static files are CSS, JavaScript, images, and fonts. Django handles them in a specific way:...

📅 30.06.2026 👁️ 73

Did you like the article?

Subscribe to our updates and receive new articles first. Grow with PyLand!