Hello!

I managed to deploy my django project in production except static
media.
When I try to access http://localhost/adminmedia/account.js (my static
media file), I get colorful page with stack trace of
django.template.TemplateDoesNotExist exception and
TemplateDoesNotExist: 500.html in apache2 log.

My project root is /var/www/webapps/katrin-web.
I want to have /var/www/webapps/katrin-web/katrin/adminmedia located
in /adminmedia.

It seems that Django tries to serve static media instead of apache2.
What's wrong with my static media?
Why standart 500.html doesn't display?

Here is my apache2 conf:
####################################
NameVirtualHost localhost:80

<VirtualHost localhost:80>
        ServerAdmin postmas...@localhost
        DocumentRoot "/var/www/webapps/katrin-web"
        ServerName localhost
        ErrorLog "/var/log/httpd2/katrin-error.log"
        LogLevel debug
        CustomLog /var/log/httpd2/katrin-access.log common
        Alias /media/ /usr/lib/python2.5/site-packages/django/contrib/
admin/media/
        Alias /adminmedia /var/www/webapps/katrin-web/katrin/
adminmedia

        <Location "/adminmedia">
                SetHandler None
        </Location>

        <Directory "/var/www/webapps/katrin-web">
        RewriteBase /
        Options +ExecCGI
        AddHandler fcgid-script .fcgi
        RewriteEngine On
        RewriteRule ^(dispatch\.fcgi/.*)$ - [L]
        RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
        </Directory>

</VirtualHost>
#########################################

some settings:
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = '/adminmedia'
ADMIN_MEDIA_PREFIX = '/media/'
STATIC_DOC_ROOT = '/adminmedia'
--~--~---------~--~----~------------~-------~--~----~
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