Django Installation and First Project

First of all, django powerful framework for python on web. Sometimes django structures is complex and I need to remember rules. For this I decided write blogpost.

First we should be install some package for linux I used debian for this and my download command for debian.

sudo apt-get install python-dev

sudo apt-get install python-virtualenv

sudo apt-get install vim

I am using text editor vim. If you don’t enjoy vim, you should gedit, sublimetext or atom editor.

Virtualenv is used for reserve a space. This method create area like virtual machine.

 

Second we go to system files. Then “cd opt” and write this command:

1

virtualenv ProjectName

 

3

 

Then we cd ProjectName and download django. For this we used “pip install Django==1.6.5”

4

5

 

Control django installation

1- open python shell

2- >>> import django

3->>>django.get_version()

6

Create django project

1- django-admin.py startproject FirstProject

2- cd FirstProject

3-python manage.py runserver

7

Control project

1- open browser

2-localhost:8000

8

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s