DEV Community

Cover image for How to Install Django and Start Your Project
Odipo Otieno (KwargDevs)
Odipo Otieno (KwargDevs)

Posted on

2

How to Install Django and Start Your Project

To install Django, you'll need to have Python installed on your computer. Once you have Python, you can use pip, which is a package manager for Python, to install Django.

Open a terminal or command prompt and enter the following command:

Copy code
pip install Django
This will install the latest version of Django. Once the installation is complete, you can start a new Django project by running the following command:

Copy code
django-admin startproject projectname
This will create a new directory called "projectname" in your current directory, with the basic file structure of a Django project.

To start the development server, navigate to the project directory and run the following command:

Copy code
python manage.py runserver
You can then view your project by navigating to http://127.0.0.1:8000/ in your web browser.

You can refer to Django official documentation for more detailed information about how to start programming with Django. https://docs.djangoproject.com/en/3.2/intro/tutorial01/

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay