DEV Community

Nishant Deshmukh
Nishant Deshmukh

Posted on

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

Sentry blog image

Identify what makes your TTFB high so you can fix it

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

Read more

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