On 12 October 2010 22:56, sami nathan <itssami.g...@gmail.com> wrote: > Hello sir, > I need to display the reult of > "http://m.broov.com/wap/di/sub?word=dog&type=00&submit=Submit" > in my url which is > http://localhost/flip/wap/di/sub?word=dog&type=00&submit=Submit > My view looks like this > from django.http import * > from django.template import loader, Context > from django.shortcuts import render_to_response > > def current_datetime(request): > word = request.GET['word'] > > url=HttpResponse('http://m.broov.com/wap/di/sub?word='+word+"type=00submit=Submit') > return (url) > > > i want response from this site to be displayed not url of the site > i want to only return the response from this site but i am getting oly > url of this site displayed
Use a HttpResponseRedirect instead to redirect the user to that URL, e.g. from django.http import HttpResponseRedirect url=HttpResponseRedirect("blah") return url That will redirect the user, i.e. the user's URL will change. If you don't want that to happen, you'll need to use python's urllib to make a request to that URL, get the response, and pass that response forward using HttpResponse. > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@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. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.