Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

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

o.
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.

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

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
</Directory>

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.
ADMIN_MEDIA_PREFIX = BASE_URL + '/media/'

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

Offline

Board footer

Moderator control

Enjoy the 16th of August
PoweredBy

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