Yep, its the slash thing, fixed it by adding an extension. I
guess
(without looking at the code) the rearrange is just because
the
internal query string dictionary is not ordered. But still -
the
encoding after the redirect shouldn't change. For example,
my query
string contains a=%E0 it will be redirected to something
else. This is
pretty obvious - I read it bu setting:
request.encoding = 'iso-8859-8'
and there is no way the redirecting code knows how to that.
Maybe the
developers should consider just passing the query string as
is,
without parsing it first.
About the urls - I have already changed it to contain an
extension,
but it was something like:
(now when i think about it, i added the slash because it
didn't work
otherwise, because of this redirect thing)
from django.conf.urls.defaults import *
urlpatterns = patterns('',
# Example:
(r'^homeless/$',
'services.homelessParser.views.parse'),
(r'^geocode/$', 'services.mapaGeoCode.views.geocode'),
# Uncomment this for admin:
# (r'^admin/', include('django.contrib.admin.urls')),s
)
On Oct 24, 9:13 am, Samuel Adam <samuel.a... gmail.com> wrote:
> It may have something to do with the CommonMiddleware:
>
> http://www.djangoproject.com/documentati
on/middleware/#django-middlew...
>
> It doesn't see the trailing slash on your query : /app?
and redirects
> to /app/?
>
> Your redirect is strange, it could be a misuse of a
regexp in your
> urls.py
>
> Could you show it here ?
>
> And what happens if you add this to your settings.py ?
>
> APPEND_SLASH = False
>
> On Oct 24, 8:40 am, Dani <dan... gmail.com> wrote:
>
> > Hi,
> > I'm a bit new to django, so I hope this isn't too
stupid.
>
> > Can anyone explain why when I'm accessing this
address:http://
localhost:8000/app?a=1&b=2&c=3
>
> > I'm getting a redirected to this address?h
ttp://localhost:8000/homeless/?a=1&c=3&b=2
>
> > This causes a problem, because I'm using a weird
encoding in one of
> > the query stings, and the redirected value encodes
it again, the wrong
> > way.
> > I guess this is a bug, because in order to read it
I used the encoding
> > attribute of httprequest which is new.
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|