Getting Started with Django: Install, Create, and Run Your First Project

This guide walks you through installing Django on Windows, verifying the installation, generating a new project with startproject, understanding its file structure, applying migrations, and launching the development server to see a working web page, all with clear command‑line steps.

Full-Stack DevOps & Kubernetes
Full-Stack DevOps & Kubernetes
Full-Stack DevOps & Kubernetes
Getting Started with Django: Install, Create, and Run Your First Project

Django is an open‑source web application framework written in Python, based on the MVC (model‑view‑controller) architecture.

To install Django on Windows, open a command prompt and run pip install Django==3.1. The package is placed in Python’s site-packages directory.

Verify the installation by launching Python and executing import django; django.get_version(), which should output 3.1.

Use django-admin startproject hello to generate a new project named hello. The created directory contains __init__.py, asgi.py, settings.py, urls.py, wsgi.py, and manage.py.

Navigate into the project folder ( cd hello) and start the development server with python manage.py runserver 0.0.0.0:8000. After applying migrations ( python manage.py migrate), open a browser at http://localhost:8000/ to see the default “welcome to my web~” page, confirming that the Django project runs successfully.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PythonWeb DevelopmentTutorialInstallation
Full-Stack DevOps & Kubernetes
Written by

Full-Stack DevOps & Kubernetes

Focused on sharing DevOps, Kubernetes, Linux, Docker, Istio, microservices, Spring Cloud, Python, Go, databases, Nginx, Tomcat, cloud computing, and related technologies.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.