I am running into some weirdness in an app im writing and so I thought
I'd try to see how the basics of URL strings are handled.
So I wrote a one line hello world app, and wanted to see how the dev
server output it's results. I am still getting my feet wet with the
whole web / http / HTML thing, these may be silly questions.
Here's my view.py
from django.http import HttpResponse
def announce(request):
return HttpResponse("Hello")
the urls.py maps announce/$ to this view, and that is working.
What's odd, is when I goto my browser and do http://localhost:8000/announce,
the dev server does this output:
[04/Jun/2008 09:22:20] "GET /announce HTTP/1.1" 301 0
[04/Jun/2008 09:22:20] "GET /announce/ HTTP/1.1" 200 5
I'm unclear as to what these are? the 301 looks like it's 'fixing' my
URL or something to redirect to /announce/ instead of just the /
announce that I put in the URL?
The reason for all this, is I'm having trouble in another post about a
torrent tracker im trying to write, and i'm not getting the parameters
passed as I would expect.
Any information about this behavior would be great.
Thanks
John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---