Hello,
I've successfully implemented mod_wsgi with Apache on Windows XP using
MySQL 5.1. Everything but the CSS/html for the index page is
working. Even the admin pages are working with style sheets. The
following is my code. I cannot seem to find the error that is not
loading the CSS style sheets for the html pages.
http.conf file
< -- code start
Include "c:/django/apache/apache_django_wsgi.conf"
<Directory "c:/django/apache">
Order allow,deny
Allow from all
</Directory>
< -- code end
apache_django.wsgi file:
< -- code start
Alias /media/ "C:/Python26/Lib/site-packages/django/contrib/admin/
media/"
<Directory "C:/Python26/Lib/site-packages/django/contrib/admin/media">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
<Directory "C:/django/mysite/site_media">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
<Directory "C:/django/mysite/templates">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
WSGIScriptAlias / "C:/django/apache/django.wsgi"
Alias /site_media/ "C:/django/mysite/site_media/"
<Directory "C:/django/apache">
Allow from all
</Directory>
< -- code end
django.wsgi:
< -- code start
import os, sys
sys.path.append("c:/django")
sys.path.append("c:/django/mysite")
# may be required :)
#sys.path.append('/path/to/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
< -- code end
settings file
< -- code start
MEDIA_ROOT = 'c:/django/mysite/site_media'
MEDIA_URL = 'http://www.myproject.org/mysite/site_media/'
ADMIN_MEDIA_PREFIX = 'http://www.myproject.org/media/'
TEMPLATE_DIRS = (
'C:/django/mysite/templates',
< -- code end
--
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.