I'm brand new to Django.  And, I was having a problem getting my CSS
working.  I searched the archives here and I saw lots of references
from people having the same problems with CSS and some debates on how
to go about making it work.  But, I never saw anyone spell out exactly
how they got it working.  So, here's my verbose run down of what I did
to get my css rendered.  If any of it is incorrect, I trust that
someone will correct me.

This is based upon the fact that I have Django installed at:
/usr/local/src/ and that I've already made it past the part of the
installation documentation that instructs you to symlink it to the
site-packages directory

There are 3 directories (css, js and img) that you want to Apache to
serve as static pages (without going through mod_python).  All 3
directories are in the following path:
/usr/local/src/django_src/django/contrib/admin/media/

Step 1.
I navigated to my DocumentRoot directory and ran:
ln -s /usr/local/src/django_src/django/contrib/admin/media/ media

Alternative to step 1, I saw someone in the archives suggested putting
the following in your <VirtualHost> stanza:
alias /media /usr/local/src/django_src/django/contrib/admin/media/

Step 2.
chown -R myApacheUser:myApacheUser /usr/local/src/django_src/django/
contrib/admin/media/
note: I never saw someone say it was OK to do this, but I had to to
make mine work.

Step 3.
add this to my <VirtualHost> for this site:
<Location "/media">
     SetHandler None
<Location>

Step 4.
retstart Apache
/etc/init.d/apache2 restart


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to