On 06/07/11 15:43, Cal Leeming [Simplicity Media Ltd] wrote:
> Today I came across a very strange problem.
> 
> When attempting to post a form (without the CSRF middleware being
> present in MIDDLEWARE_CLASSES), django would *always* return a blank
> page. If the post contained no data, it would come back fine, but if
> it did contain data, it would come back blank.
> 
> Upon adding the CSRF middleware into the MIDDLEWARE_CLASSES, and
> adding {% csrf_token %} into the template, it would return back fine
> (and without csrf_token - it would return back an exception, as it
> should).
> 
> Although it is a good thing that it happened (because I did actually
> forget to include CSRF middleware), I feel that Django should raise an
> exception (if this is the default behaviour), to tell the user they
> must enable CSRF middleware, rather than just returning a blank page.
> 
> Any thoughts??

Sgreed, but there isn't enough information here to work out what is
going on. Please file a ticket if you can create a test case that will
reproduce it. I can't think of any code paths in Django that would
return 'a blank page' (though I'm not sure I know what you mean by that).

Luke


-- 
 A mosquito cried out in pain:
 "A chemist has poisoned my brain!"
 The cause of his sorrow
 was para-dichloro-
 diphenyltrichloroethane

Luke Plant || http://lukeplant.me.uk/

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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.

Reply via email to