On Jan 28, 3:51 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Wed, Jan 28, 2009 at 3:39 PM, May <adles...@gmail.com> wrote:
>
> > Hello,
>
> > I have the admin templates with CSS working under local server windows/
> > apache/modpython.  Now I would like to get my site css files to work
> > under apache.
>
> > The settings and http.conf code is here:
> >http://dpaste.com/114010/
>
> > I can place mysite css and images under the apache htdocs, but I can't
> > seem to get apache to read them when I type this into my css link:
>
> > <link href="http://127.0.0.1/css/stylesheet.css"; rel="stylesheet"
> > type="text/css" media="screen">
>
> > Thanks for any help.
>
> You've got Apache set up to route everything to mod_python except for a
> Location block that specifies '/media/', where you have specified SetHandler
> None.  So any URL that starts with /media/ will get handled by Apache
> directly.  But your href value above doesn't start with /media/, it starts
> with /css/, so this request gets routed to mod_python.  If you want Apache
> to handle it directly you'll need to change it so that it starts with
> '/media/', not '/css/'.
>
> Karen

You should also review the Django docs on all the settings. Your
MEDIA_ROOT should be a path, not a URL. Your ADMIN_MEDIA_PREFIX should
not be the same as your MEDIA_URL.

Basically you setup a directory somewhere, usually in your httpdocs
directory for your media files. That is your MEDIA_ROOT. Put your
static files there. Your admin files have to go under there too,
somehow. This can be by symlink or by copying the django admin files
in there. This is covered in the django docs on deploying under Apache/
mod_python. Your ADMIN_MEDIA_PREFIX will be put in front of any admin
static file.

Settings docs:
http://docs.djangoproject.com/en/dev/ref/settings/#ref-settings

Deploying on Apache/mod_python docs:
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#howto-deployment-modpython

Good luck!
--~--~---------~--~----~------------~-------~--~----~
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 at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to