๐Ÿ“ Django

Django Development Server

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

Django’s built-in server is intended for local development: it runs the project and reloads Python code when files change.

Starting the server

python manage.py runserver

By default the server starts at http://127.0.0.1:8000/.

Startup options

python manage.py runserver 8080              # different port
python manage.py runserver 0.0.0.0:8000     # accessible from the network
python manage.py runserver --noreload        # disable auto-reload

Auto-reload

The server automatically restarts when Python files change. Exceptions:
- New files are not always picked up โ€” a manual restart is required
- Template changes are picked up without a restart

What it does NOT do

  • Not suitable for production โ€” single-threaded, no optimizations
  • Does not serve static files efficiently (but does serve them when DEBUG=True)
  • Does not support HTTPS

DEBUG and static files

# settings.py
DEBUG = True  # shows error pages, serves static files via runserver

With DEBUG=False static files are not served through runserver โ€” whitenoise or nginx is required.

Console logs

[27/Jan/2024 10:30:00] "GET /tasks/ HTTP/1.1" 200 1234
[27/Jan/2024 10:30:01] "POST /tasks/new/ HTTP/1.1" 302 0

For production

pip install gunicorn
gunicorn mysite.wsgi --workers 4 --bind 0.0.0.0:8000

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

๐Ÿ“

settings.py: Django Configuration

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

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

CSRF Protection in Django

CSRF (Cross-Site Request Forgery) is an attack in which an adversary tricks the user's browser...

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

Django Migrations

A migration is a file describing changes to the database schema. Django tracks the state...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 286

Did you like the article?

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