Re: Django POST Broken

2010-11-10 Thread Andrew W
I just ran into this same issue, but it wasn't Django, the answer
lived in nginx.conf
try checking the
client_max_body_size M;

in your server{

On Nov 10, 9:42 am, john <185...@gmail.com> wrote:
> Hello,
>
> I'm working on a Django project. I'm running on cloudservers hosting,
> with nginx/uwsgi as the server. I'm trying to get an image upload form
> working with POST, but I'm running into some problems.
>
> Basically, it comes down to this: if I comment out this line:
>
> uwsgi_param  CONTENT_TYPE       $content_type;
>
> in the uwsgi_params file, POST suddenly works. However, this breaks
> the admin screen.
>
> Anyone have any idea what's going on? Whether or not this is even a
> Django issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Django POST Broken

2010-11-10 Thread Jason Mayfield
My company uses the nginx + uwsgi combination extensively (well, so far it's 
the stack serving Django on 6-ish servers) and haven't ever had this particular 
problem.  For reference, here's our (stock) uwsgi_params file:

uwsgi_param  QUERY_STRING   $query_string;
uwsgi_param  REQUEST_METHOD $request_method;
uwsgi_param  CONTENT_TYPE   $content_type;
uwsgi_param  CONTENT_LENGTH $content_length;

uwsgi_param  REQUEST_URI$request_uri;
uwsgi_param  PATH_INFO  $document_uri;
uwsgi_param  DOCUMENT_ROOT  $document_root;
uwsgi_param  SERVER_PROTOCOL$server_protocol;

uwsgi_param  REMOTE_ADDR$remote_addr;
uwsgi_param  REMOTE_PORT$remote_port;
uwsgi_param  SERVER_PORT$server_port;
uwsgi_param  SERVER_NAME$server_name;

- Jason

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Django POST Broken

2010-11-10 Thread Russell Keith-Magee
On Wed, Nov 10, 2010 at 11:42 PM, john <185...@gmail.com> wrote:
> Hello,
>
> I'm working on a Django project. I'm running on cloudservers hosting,
> with nginx/uwsgi as the server. I'm trying to get an image upload form
> working with POST, but I'm running into some problems.
>
> Basically, it comes down to this: if I comment out this line:
>
> uwsgi_param  CONTENT_TYPE       $content_type;
>
> in the uwsgi_params file, POST suddenly works. However, this breaks
> the admin screen.
>
> Anyone have any idea what's going on? Whether or not this is even a
> Django issue?

I would be deeply surprised if this were a Django issue -- "POST"
being broken would be a pretty fundamental failing for any web
framework. The only way I can see this being a Django issue is if
there is some subtle issue with our WSGI wrapper that only a
NginX/uwsgi combo exposes. However, even this seems unlikely -- we
have a fairly large installed base of users, using a wide range of web
servers. I don't personally know anyone using NginX/uwsgi, but I'd be
surprised if there weren't at least a couple of people using it.

So -- my money is on a configuration problem of some sort. I have no
suggestions on where to look, however; I don't know enough about uwsgi
to point you in the right direction.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Django POST Broken

2010-11-10 Thread john
Hello,

I'm working on a Django project. I'm running on cloudservers hosting,
with nginx/uwsgi as the server. I'm trying to get an image upload form
working with POST, but I'm running into some problems.

Basically, it comes down to this: if I comment out this line:

uwsgi_param  CONTENT_TYPE   $content_type;

in the uwsgi_params file, POST suddenly works. However, this breaks
the admin screen.

Anyone have any idea what's going on? Whether or not this is even a
Django issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.