Section 1: Install Django on your local machine and run a simple page
If you have already installed Django, please jump to the next section.
The last version to support Python 2.7 is Django 1.11 LTS. See the FAQ for the Python versions supported by each version of Django. Here’s how to get it: Option 1: Get the latest official version. The latest official version is 3.1.2. Read the 3.1.2 release notes, then install it with pip: pip install Django3.1.2. Download; By downloading, you agree to the Terms and Conditions. Other platforms Try Atom Beta Try Atom Nightly. A hackable text editor for the 21st Century. Teletype for Atom. Great things happen when developers work together—from teaching and sharing knowledge to building better software. Teletype for Atom makes collaborating on code just.
If you are not sure if you have Django on your computer, please open terminal and enter:
If you already have Django installed, it should show something like this:
If you don’t have Django, please follow the rest of these steps.
![Download Django Mac Download Django Mac](/uploads/1/2/4/8/124849304/788974565.png)
Step 1: Verify that you have Python on your computer
Django requires Python to work. Django can work with different versions of Python.
Make sure that your Python version is one of
2.7
or 3.2, 3.3, 3.4, 3.5 versions
. Depending on the version of Django, you’ll need to make sure that you have a verified working Python version. As of May 20, 2015, version 1.8.2 is the stable release of Django.Since Django comes along with a light SQLite database, you don’t need to worry about the database at this point.
Download Django 2.1
Open your terminal and type:
If you already installed Python, something line this should show up:
If your computer doesn’t have Python, you should download it from:
You should either download the 2.7 version or 3.4 version. Since I am using 3.4 in this tutorial, 3.4 is recommended.
Step 2: Install pip
After you have made sure that you have Python, it is time to install pip.
pip
is a tool that enable us to easily install Django.If you are not sure if you have pip on you computer, you can open your terminal and enter:
Django Framework Download
If you don’t have
pip
on your computer, you have to get the get-pip.py
installation file. Download the following:Afterwards, change directory to the location get-pip.py, go to your terminal, and enter:
Step 3: Using pip to install Django
After you make sure you have
pip
installed on your computer, go to the terminal and enter:Django Download File From Server
You will need to enter the password of your computer. You can also specify a specific version of Django to install. Since the stable release at the time of writing is 1.8.2, I’ll show the command to install that version:
Section 2 : Start a project
Step 1: Create a project
Open your terminal, cd to your Desktop or the place where you want to put your project and enter the following command:
You will see a directory called
blog
appear on the Desktop. It contains all the framework file to help you generate your website.Step 2:
Download Django Macro
In your terminal, cd to into the
blog
folder and enter:You will probably see:
Now, open a web browser. In the address file, enter the address that is showing in your terminal.
On the terminal and yours, by default, it will say http: //127.0.0.1: 8000
127.0.0.1
means localhost
on every computer.Download Django Mac Download
So I enter: http://localhost:8000 or http: //127.0.0.1: 8000 inside the web address of my browser, and it takes me to the default view of a Django site! You did it!