Friday, November 19, 2010

URL grows in address bar with each click

I've noticed a thing which is likely a symptom of something I'm doing
wrong. A good example is a page I'm serving which holds a form. If
there are issues with the form content, the same page is reloaded,
with an updated warning message in the body of the HTML.

The page is, say, addInfo.html and the urlconf for it is:

(r'^moreInfo', 'myProj.app.views.goInfo'),

And in my views.py I call that page again with a message

def goInfo(request):
...
badInfo = "That name is not in the database"
return render_to_response(tempsDir +'addInfo.html', {'WarnText':
badInfo })

It all works very nicely, but I've noticed that as this gets called,
the URL in the address bar of the browser keeps growing with each
pass:

Going from http://localhost:8000/moreInfo
to: http://localhost:8000/localhost:8000/moreInfo
to: http://localhost:8000/localhost:8000/localhost:8000/moreInfo

Similarly other urls get appended occasionally in other situations.
My searching isn't turning anything up about appended URLs or growing
URLs. Does someone know what causes this and how I can just make it
stop growing?

Regards,

Ross.

--
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 http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate