Pages

Sunday, 15 September 2013

How to Install Django on Windows

Since Django is written in Python, we need to install python first, to make it run. If you're on windows, you'll need to download and install Python.

1. Install Python

Install Python

2. Install Django
a. Download and extract.
I recommed using 7zip to extract the tar.gz file.
Extract Django

b. Start up the command prompt and run the following command withing the directory start name with Django-(version you've been downloaded).

command:
python setup.py install

Oops..
The cmd respond 'python' is not recognized as internal or external command, operable program or batch file.
Dont't be panic!
Just remove the 'python'..
so the command will be:
setup.py install


Django Installed

Viola.. you've got Django installed, ready to step further :)



Web Development Intro

There're three common ways of developing website; from scratch, using framework (CakePHP,CodeIgniter, Rails, Django, or using CMS (Drupal, Joomla, Wordpress, etc).

What's the difference?
I'll give you an anology to show the difference. A couple of husband and wife decided to build their house with spesific design. They set the due date is in six months later. They have three choices; (1) build by their own (own material & own resources), (2) build by their own resources and ready-to-use-material (no need to make their own material), (3) find the house that meet their specific design and buy it or find the house, buy and customized it to meet their spesific design.

Point (1) is how we develop from scratch. We use our own code (without any library). Point (2) is how we develop by using framework. We still have to code the web but not from scratch, we can use the library provide from the framework. The last point (3) is how we use CMS. We can choose the modules, use it or customize it (may include making own modules).

In my project I'll use Django framework. This framework adheres to the principle of Don't Repeat Yourself (DRY) and provides a powerful templating system that lets the developer design, content and code separately.