I'm a python and django noob and am having major problems getting css
files to load.
My problems are this. First off, I was able to get the development
admin working with my project fine, but when I try to serve it up
using apache and mod_python, it's looking for the project under my
Python25 directory (c:\dev\Python25), not in c:\dev\testproj.
Also, when I copy the project to c:\dev\Python25, I can get the admin
interface, but without CSS.
And worse, even in the development server, I can't get templates to
use my custom css files at all. I include a line like
<link rel="stylesheet" type="text/css" href="/main.css" />
but I've tried putting that file everywhere under the sun to no
effect.
Yes, I've seen the documentation and it did not help me any.
Here's my setup: I'm running XP with apache installed, and django .
96.
My dir structure looks like:
c:\dev\testproj - is where I have my django project
c:\dev\webdev - is my apache document root
Python is installed in c:\dev\Python25 with django under there in lib
\site_packages\django
Mod_python is working and I have this in my http.conf
<Location "/testproj/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE testproj.settings
PythonDebug On
PythonPath "['c:\\\\dev\\\\testproj'] + sys.path"
</Location>
<Location "mainmedia">
SetHandler None
</Location>
I've tried adding a number of permutations of this to my settings.py
file... I'll just include the last one
MEDIA_ROOT = 'c:/dev/testproj/mainmedia/'
MEDIA_URL = 'http://127.0.0.1:8000/mainmedia/'
and this to my urls.py
(r'^mainmedia/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'c:/dev/testproj/mainmedia'}),
ANY help would be greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---