DEV Community

Nishant Deshmukh
Nishant Deshmukh

Posted on

3

Django setup for mac

Django is the framework for designing the web applications using python.While starting with Django we have to setup/create the virtual environment in our working directory then we can go for building the web application.

🔶 COMMANDS :

  1. Gives the path where you want to create a project folder: cd /Users/nishant/Desktop (Note : There is space between the cd & /)
  2. Then create a folder : mkdir my_projects
  3. Then Create the virtual environment using python : python3 -m venv env (Here env is the name of environment you can give the name as per your choice).
  4. Then we have to activate the virtual environment using command :source env/bin/activate (env is the name of an environment )
  5. After that the environment is ready to work with the given directory now we have to install the django only in given environment using command : pip install django
  6. Then we are creating the project using django : django-admin startproject first_project (Here first_project is the name of the project you can give the name as per your choice).
  7. Then open the project : cd first_project
  8. Finally we have to run the server using command : python3 manage.py runserver
  9. After that in terminal the ip address is created for the launch the project on web : i.e. 127.0.0.1:8000
  10. Copy the ip address and paste it on chrome.
  11. Done 👍🏻.

🔶 Screenshots :

Image description

Image description

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

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

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay