Thank you all!
Indeed, it was because I was using Django's internal server
(runserver).
When I tried any other url, it worked.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
Wondering if you were able to solve this one?
Trying something similar, can you post the rest of the source, I'm a
newb, thankyou
lg
On Jan 28, 11:19 pm, Michael Elsdörfer <[EMAIL PROTECTED]>
wrote:
> > but the page seems to load forever and I'm stuck!
>
> I'm pretty sure I ran into this before
> but the page seems to load forever and I'm stuck!
I'm pretty sure I ran into this before, and IIRC it's because Django's
runserver, which I assume you are using, can only handle one request at
a time - try a different test url.
Michael
MariusB schrieb:
> I'm trying to take a link as an arg
On Jan 28, 2008 5:28 PM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> def url_head(request):
>c=urllib.urlopen(request.GET['url'])
>content=c.read()
>
http://example.com/url_head?url=file:/etc/passwd
It's very important to do some basic sanity checking on the url. Just saying
:-)
Remco
Am Sonntag, 27. Januar 2008 19:39 schrieb MariusB:
> I'm trying to take a link as an argument, open it, read it's content
> and then display the first 50 characters from it.
> First of all, I've tried to put the code in the views.py, but I didn't
> make it. Now I made a middleware component with t
I'm trying to take a link as an argument, open it, read it's content
and then display the first 50 characters from it.
First of all, I've tried to put the code in the views.py, but I didn't
make it. Now I made a middleware component with this code:
import urllib2
from django.shortcuts import rend
6 matches
Mail list logo