Ok, I found it myself.

Since the Apache update lots of former included modules weren't
included anymore.

I had to include mime_module to the Apache. Now stylesheets (CSS) are
not just loaded but also correctly interpreted.

Added to the httpd.conf:
LoadModule mime_module /usr/libexec/apache2/mod_mime.so

..and restart Apache, of course.

Not really a Django issue... but maybe someone searches for help with
a similar problem and finds this via Google and helpful. :)

Max

On 9 Apr., 21:22, Max <[email protected]> wrote:
> Hi!
>
> I recently updated all my Django-development-environment... from
> Apache over mod_wsgi, Python to Django.
> (On MAC OS X 10.5.8)
>
> It wasn't that easy but now at least Django seems to be working and
> serves from localhost for development.
> However... the CSS aren't applied on the Django generated templates.
>
> I switched from Django 1.1 to 1.3... so the staticfiles app is new to
> me.
>
> Even though I'm working on my own computer I have the files ordered in
> a production setup.
> As explained in the Django documentation my folders for images, css,
> etc. are excluded from being served via mod_wsgi.
> Here is the example for the css-folder (from the httpd.conf):
>
> Alias /project/css /Users/max/Documents/project/Website-Code/current/
> css
>
> <Directory /Users/max/Documents/project/Website-Code/current/css>
> Order deny,allow
> Allow from all
> </Directory>
>
> If I type "http://localhost/project/css/basicstyle.css";, for example
> in the browser it displays the CSS as text in the browser window. So
> the setup seems to work.
>
> However... the Django generated templates contain
>
> <link rel="stylesheet" href="/project/css/basicstyle.css" type="text/
> css" />
> or
> <link rel="stylesheet" href="http://localhost/project/css/
> basicstyle.css" type="text/css" />
>
> in the header... but obviously the CSS isn't used when the page is
> displayed.
>
> What could be the reason?
> All the staticfiles settings etc. do not apply since css are not
> served via Django in this case, right?
> Btw. images (that are handled the same way, just different folders)
> are being loaded into the template.
>
> What could be wrong?
> Is there some major difference between Django 1.1 and 1.3 regarding
> css in a production setup? Anything I overread?
> Is it an issue of Django at all?
>
> Thank you for any hint.
> Max

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

Reply via email to