My voca­tion is more in com­po­si­tion really than any­thing else — build­ing up har­monies using the gui­tar, orches­trat­ing the gui­tar like an army, a gui­tar army.
-Jimmy Page

Sticks and stones may break my bones, but words will make me go in a cor­ner and cry by myself for hours.
Eric Idle

The world is a tragedy to those who feel, but a com­edy to those who think.
-Horace Wal­pole

Men show their char­ac­ter in noth­ing more clearly than what they think laugh­able.
-Johann von Goethe

You can find lots of good infor­ma­tion at the Django Project.  I will be fol­low­ing one of the options in the instal­la­tion guide.  First I will down­load the lat­est django, here and save into my newly cre­ate django folder in my home directory.

After unzip­ping the pack­age, run the set up to install django.

Change the cur­rent direc­tory to your home folder.  Then, test the django install.

What data­base to you want to use?  Chose one or more of the fol­low­ing installs(sqlite, mysql, postgresql):

  • sudo apt-get install python-sqlite
  • sudo apt-get install python-mysqldb
  • sudo apt-get install python-pgsql

Let’s test django by mak­ing a project.  Do NOT put your code under /var/www.  For secu­rity rea­sons, this is the django way.  In the exam­ple, I have cre­ate a new folder djcode.  Then, I cre­ated the project hel­loworld with the com­mand django-admin.py start­pro­ject hel­loworld.  After chang­ing into the new hel­loworld folder,  start the web server, python manage.py run­server and goto http://localhost:8000 with your web browser.

Tags: ,

1 Comment on Python with Django

  1. quick & easy
    lot of thanks !!!

Leave a Reply


*