On Thursday, 11 August 2011 09:20:41 UTC+1, Igor Nemilentsev wrote:
>
> Hello everyone.
>
> I try:
>
> content = urllib2.urlopen('http://localhost:8080/').read()
>
> from inside some Django view(function)
> and http://localhost:8080/ is same Django server.
>
> This command do not give me any answer but hang on.
> But if url is foreign it is working.
> Is there some cycle problem? Is it possible to 
> get some page from inside Django using foreign
> tools(curl, urllib)?
>

The development server is single-threaded, so it can't fulfill a second 
request while still working on the first one.

It would work with a production server, but I can't think why you would want 
to do it - inside your code, you have access to the views that generate all 
the pages, so why would you want to go via the web instead of calling the 
code directly?
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/NbeV4OI5MJcJ.
To post to this group, send email to django-users@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.

Reply via email to