attribute: Phillie Casablanca

Notes on getting django started

After following the web faction recommended screen cast and the blog easy app tutorial mentioned in the previous post I still had some issues.

1. It wasn't clear to me how to reflect changes made at first. I kept seeing the "this is your first page" page.
Resolved by: using /home/username/webapps/django/apache2/bin/stop then start

2. The admin page was not using the formatting I saw in the tutorials.
In the screen cast a similar issue was seen, and he checked the apache2/log/error.log where errors to files not found were reported. I didn't see any errors like this.

Resolved by:
I checked the file in my project and this is found:

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "", "/media/".

Ok, so media (css, JS, etc) should be in this media file, but where is this directory?

A little searching came up with the answer.

Apparently, I had to add the following to "/django/apache2/conf/httpd.conf":

This added to the LoadModule list at the top:
LoadModule alias_module /home/username/webapps/django/apache2/modules/

and this to the bottom of file:

SetHandler default

Alias /media /home/username/lib/python2.5/django/contrib/admin/media

Formatting fixed!

monkut // April 15, 2008 // 7:19 a.m.