Trapping underlying exceptions

2018-01-05 Thread Stephan Doliov
Hi, I am diving ever deeper into Django and I came upon some behavior that frustrated me but perhaps I am just misunderstanding what should happen and why. In writing unit tests for code, I wanted to write one that traps a json.decoder.JSONDecodeError by passing in some malformed JSON. What ap

Is CSRF middleware to be taken seriously (from a XSRF point of view)?

2018-01-15 Thread Stephan Doliov
Just curious, I recently went on a source code studying binge and took a look at the CSRF middleware that comes with Django. I appreciate the work and effort of the authors, but I am not sure I gain anything by deploying it to my site. Here is why: The middleware token assigned to a form and to