Hi, I have a simple Django application which runs appropriately in the Django development server. I am deploying it with Apache and mod_wsgi. Using a simple wsgi file as described in various deployment documents (e.g., http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/), the application displays in deployment mode, but as text with no layout.
I assume there is a pathing issue where Apache can't see the templates, either in my project or in the Django distribution or both. Any suggestions? Below I describe two things I found and tried which did not solve the problem. This site http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi suggests calculating the path based on the location of the WSGI script: apache_configuration= os.path.dirname(__file__) project = os.path.dirname(apache_configuration) workspace = os.path.dirname(project) sys.path.append(workspace) but that does not change any behavior. I tried a suggestion in this post http://groups.google.com/group/django-users/browse_thread/thread/310dbbd16bd840f5 on the Django Users group which mentions setting the template path dynamically in settings.py: import os.path OUR_ROOT = os.path.dirname(os.path.realpath(__file__)) TEMPLATE_DIRS = ( os.path.realpath(os.path.join(OUR_ROOT, 'templates')), ) This was in response to having different settings files for development and deployment, but it was one of the few things I found that related to identifying the template locations. I'd appreciate any ideas. Thanks, Rick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

