On 07 May 16:00, steve malise wrote:
> The error comes when i runserver and send data from another computer to
> django,then i get this "code 400, message Bad request syntax ( data from
> another computer)"

This is because

On 07 May 11:42, Tom Evans wrote:
> Eurgh. Your hand-crafted HTTP request is not a valid request. Use one
> of the http libraries built in to python:

You can find here some directions on forming the request validly, 
http://www.w3.org/Protocols/Specs.html

as you apparently don't want to use any of the libraries below.

On 07 May 16:00, steve malise wrote:
> urllib2:
> https://docs.python.org/2/howto/urllib2.html#data
> 
> httplib:
> https://docs.python.org/2/library/httplib.html#examples
> 
> or use a 3rd party library that wraps those in a more pleasing interface:
> 
> requests:
> http://docs.python-requests.org/en/latest/

Using one of the above-listed libraries would still accomplish what you
are trying to do, as you described here,

On 07 May 16:00, steve malise wrote:
> What i am trying to do is run python script(client side) on another
> computer which is on same network with my computer,then receive data from
> another computer with the django(which is running on my computer(server
> side)).i am using built-in "runserver".

so I suspect that you are doing something more that we missed. Perhaps
you could tell us why you want to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20150507141332.GA27942%40d1stkfactory.
For more options, visit https://groups.google.com/d/optout.

Reply via email to