Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 28, 2011 16:44:58

Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Settings to Load CSS Files

I am running Django 1.2.4 mod_wsgi. My admin site loads with its look
and feel. I am trying to add css to my application, which works fine.
I have looked through the docs, and cannot get a sample css file to
load. I would appreciate some pointers to get this working.

Here are the appropriate lines from the base template.

<!-- Test Comment -->
<title>{% block title %}Town of Arlington Water Department AMR
System{% endblock %} </title>
<link rel="stylesheet" type="text/css" href='static_content/
PageStyle.css' />

Here are the appropriate lines from httpd.conf
DocumentRoot /usr/local/www/documents
AliasMatch ^/(*\.css) /usr/local/www/documents/static/$1

<Directory /usr/local/www/documents/static>
Order deny,allow
Allow from all

Here are the appropriate lines from settings.py
# Main URL for the project
BASE_URL = 'http://localhost:8002'

# Absolute path to the directory that holds media
MEDIA_ROOT = '/usr/local/www/documents'

# URL that handles the media served from MEDIA_ROOT
MEDIA_URL = '/static/'

# URL prefix for admin media -- CSS, JavaScript and images.

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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


Board footer

Moderator control

Enjoy the 27th of May

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support