You do realise that Apache will generally run your application as a special user. If that special user doesn't have read access to stuff, then things can not work properly. See:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights_Of_Apache_User There is a lot of documentation on mod_wsgi site about issues that can come up with mod_wsgi. There is also documentation on using it with Django which is more detailed than Django's own documentation. Graham On Jun 4, 3:47 am, Rick W <rick_wa...@mail333.com> wrote: > 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 > posthttp://groups.google.com/group/django-users/browse_thread/thread/310d... > 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 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 -~----------~----~----~----~------~----~------~--~---