Wednesday, January 02, 2008

Fun with python: web development with Django: part 1 setup

After setup my database, install the ide(the openkomodo post). Now, the next step is to start a project. And I decide to play with python, and django is in my list, because 1) it's python, 2) it's works on gutsy, where as turbogears don't. 3) I kinda like the django's own ORM.

First thing first, installation is dead simple,
1) get django
http://www.djangoproject.com/download/


get tar file, It just happens I use that.
2) untar it somewhere,

3) run the command in the directory you untar'ed
python setup.py install
So nothing special.

One note here is, you will need a extra web server. It turn out that, django assumes that, there is a separate server, other than it's own server, serving media like image and file. And it is a pain that to create a links etc. It's actually easier to just enable userDir in apache. and put in the picture in public_html directory, in your home.

I need userdir because, it need a directory that can be written into. And since a ubuntu user account cannot directly access the apache root, which is in /var/root.


Now you have a web framework, that have a few interesting feature, and a internal server for development purposes

No comments:

Post a Comment