@keith, your suggestion seemed to be make a "real" request? I don't want to make real request since it's not light weight enough.
@ Jeff, thanks. I don't want to call from view, I want work with the "URL". But your suggestion is good, I will look inside django code to see how to do so. On Oct 1, 1:58 am, Jeff Anderson <[EMAIL PROTECTED]> wrote: > maverick wrote: > > Hi, I have a django web application, I want to invoke a request of one > > URL inside this application, e.g. "/getdata/", and capture the output > > of such URL and do some further processing. > > > Of course I can do that by make a real request, however I feel this > > may not be the best solution, is there any internal way to invoke a > > request ? > > If the url is part of your Django project, just call the view function. > You can either instantiate a dummy request object to pass to it, or pass > it the one that you have available already. You'll get an response > object back, and you can take the content of the response object, and do > whatever you want with it. > > I ran into something similar and worked out how to implement it. I > haven't actually done it yet, so I can't share any gotchas that might > come up. > > Cheers! > > Jeff Anderson > > signature.asc > < 1KViewDownload --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---