• We just launched and are currently in beta. Join us as we build and grow the community.

Python Getting Started w/ Django Framework

xbgerrit92

Tech Researcher
X Rep
0
0
0
Rep
0
X Vouches
0
0
0
Vouches
0
Posts
50
Likes
35
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Getting Started

Let's begin the tutorial by installing Python if you haven't have it yet.

You can download Python IDLE(Integrated Development And Learning Environment) using this link: Download Python

After installing Python, let us now install Django. You can do so by opening command prompt(press search then type cmd) and type pip install django
1_163.png

Creating our Directory

Create a directory folder where you will put your app or website. In this tutorial, I've created django project folder in my desktop.

Open cmd on the directory you created. In windows, you can do so by right clicking the folder and click Open command window here or navigate to the folder and then simply type CMD in the address bar and hit Enter to open the command prompt window there.

2_77.png

Creating our Site

On the directory folder that we created, type django-admin startproject samplesite.

3_19.png


Here, we have created our site named samplesite
Running the Server

Go to the site that we have created by typing in cd samplesite. Then, type the python that you want the site to use(this is the python that you have installed). If you have several python versions installed on your computer, you can do this by typing the full directory of the python the you want to use. In my case, I only have python3, so, I'm going to just type python manage.py runserver.

4_7.png

Test the Site

We now check if our website is running by typing 127.0.0.1:8000 in your browser which is the localhost of Django.

Your site should look like this. If it doesn't, something went wrong or you missed a step.

screenshot_47.png


That ends this tutorial. Happy Coding :)


Download
You must upgrade your account or reply in the thread to view the hidden content.
 

452,292

324,186

324,194

Top