📝 Django

Django Development Server

P
Author
Pyland
📅
Published
30.06.2026
⏱️
Reading time
1 min
👁️
Views
81
🌱
Level
Beginner

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

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

📝

pytest-django: Testing Django

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

📅 30.06.2026 👁️ 130
📝

AI Agents: ReAct Loop and Autonomous Actions

A chatbot answers questions. An agent takes action: it calls tools, retrieves real data, and...

📅 30.06.2026 👁️ 97
📝

RAG: Chatting with Documents via Vector Search

RAG (Retrieval-Augmented Generation) is a pattern for working with your own documents. Instead of fine-tuning...

📅 30.06.2026 👁️ 86

Did you like the article?

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