Hi!
I'm deploying a django project on my server. I'm using next apache
configuration:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /home/user/project
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonDebug On
PythonPath "['/home/user/project','/home/apps/app1','/
home/apps/app2'] + sys.path"
</Location>
<Location "/media">
SetHandler None
</Location>
<LocationMatch "\.(jpg|gif|png)$">
SetHandler None
</LocationMatch>
<Location "/admin/media">
SetHandler none
</Location>
Alias /media "/home/user/project/media/"
Alias /admin/media "/usr/share/pyshared/django/contrib/admin/
media/"
ErrorLog /home/user/logs/error.log
# Possible values include: debug, info, notice, warn, error,
crit,
# alert, emerg.
LogLevel warn
CustomLog /home/user/logs/access.log combined
</VirtualHost>
I want to override admin templates. I created a basic_site.html on /
home/user/project/templates/admin directory. On my machine, it works
perfectly, but if I user apache it doesn't work. If I use django web
server (python manage.py runserver ip:port) it works too.
I'm using next settings.py:
...
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
...
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
...
I probed to use this with same result:
TEMPLATE_DIRS = (
'/home/user/project/templates',
)
Thanks in advantage!
--
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.