Hello, I have been running a django site on apache using the following alias...
WSGIScriptAlias /apps /path/to/django_application/apache/django.wsgi In doing this I was pleasantly surprised to see that most of the URLs worked fine. The only thing I needed to change was LOGIN_URL='/apps/ login' in settings.py. Nowhere else in my code is /apps mentioned because apache sets some script prefix variable that wsgi tells django about and all is well. Now I am running into a problem with my cron jobs that run outside the context of apache and my URLs generated with "http://%s%s/" % (Site.objects.get_current().domain, reverse(*args, **kwargs)) are missing the /apps part. I was okay with having one thing my code having /apps hard coded but now I'm looking at having to see what context I'm running in (apache vs. cron) and selectively adding this prefix. This would introduce another place where I'd need /apps hard coded which I don't like. I wasn't really happy with having to do it the one time. Questions: Would running in a subdomain solve all my problems? For example using apps.example.com rather than example.com/apps/. Are there other parts of django that I have not run into yet that expect django to be ran at the root? If I can't get IT to give me a subdomain, what is the best way to detect whether the code is running inside Apache or outside so that I can slap /apps into my URLs? Thanks in advance, ~Eric --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---