How-To: Install Django on Your Linux Server or Development Desktop

Python-Django Terminal Screenshot

I was going to go through the trouble of documenting the process of installing Django on a Debian-based Ubuntu Server, but it looks like the python web-framework has been added to the repository in both Debian and Ubuntu (and a few others). The package has been dubbed python-django, so the install code is simply:

$ sudo apt-get install python-django

To add support for your database of choice (mine is MySQL), install its corresponding adapter (i.e. python-pysqlite2, python-psycopg, python-mysqldb):

$ sudo apt-get install python-mysqldb

To add Apache support for production use, install mod-python (note: Django has a development server built-in):

$ sudo apt-get install libapache2-mod-python

To start a test project called “mysite”, do the following (note: a directory called mysite will be created in the directory you’re currently working in):

$ django-admin startproject mysite

Happy coding!

Related:
Django Documentation - How to install Django
Django Documentation - Third-party distributions of Django
The Django Book (FREE online resource)
How-To: Add a LAMP Server to Your Linux Desktop for Development

Popularity: 35% [?]

Tags: , , , , , , , , ,


Comments

One Response to “How-To: Install Django on Your Linux Server or Development Desktop”

  1. Daniel on September 27th, 2007 10:45 am

    Thanks for this short tutorial

Leave a Reply