Getting Started With Django

Alyssa Lerner First
1 min readMar 7, 2021

--

So you want to build a website using Python.

Well, odds are you’ll be planning to use Django for the framework for said website. Which means your next step is getting Django installed on your machine.

If you’re using Mac or Linux, first make sure you have Python installed. Just open up a terminal and type python3 and see what happens. If you get an error, go ahead and install Python 3. If you get a version number, you have Python 3 installed already. Great! Type exit() to exit the python shell.

Next, you’ll want to install pip, a package manager for Python. You can download it by typing the following command in the terminal (make sure you’re in the directory where you want it installed):

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Now type python3 get-pip.py to install what you’ve just downloaded.

Next it’s time to install Django using our new package manager. Type python3 -m pip install Django.

To actually create your new project, navigate into the directory where you want it to live, then type django-admin startproject myapp.

That should set up all the basic files and folders you’ll need.

If you have any issues with the install, you can check out the official guide here. Otherwise, you’re good to go!

--

--

Alyssa Lerner First
Alyssa Lerner First

Written by Alyssa Lerner First

Software developer and science/tech writer. Python, Ruby on Rails, JavaScript, React/Redux, Java. Fascinated by the amazing stories behind today’s tech.

No responses yet