|So, a while ago I wrote here about starting to experiment with Django, and now I have come to a stop...
I usually map my Django projects on the root, but this time I tried something different and failed very badly...
I tried to map it to http://foo.com/django and encountered two problems, I hope you guys can help me with...
If I go to address http://foo.com/django (without trailing slash) I get an Internal Server Error.
Log shows this info:
File "/var/lib/python-support/python2.5/django/middleware/common.py", line 41, in process_request
if settings.APPEND_SLASH and (old_url1-1 != '/') and ('.' not in old_url1.split('/')-1):
IndexError: string index out of range
If I include the trailing slash it works (at least it seems to).
APPEND_SLASH is (obviously) set to True.
Let's go with urls.py that looks like this:
from django.conf.urls.defaults import *
from djangobook.views import hello
urlpatterns = patterns('',
Instead of going to http://foo.com/django/hello I get redirected to http://foo.com/hello. I presume I'm missing a setting or something to make it relative to the project's starting URL?
We are using Linux daily to UP our productivity - so UP yours!