Re: Provide a way to pass kwargs when initializing the storage class

2022-04-23 Thread Jarosław Wygoda
I'd like to introduce a file storage registry similar to BaseConnectionHandler (django/utils/connection.py) and EngineHandler (django/template/utils.py). Example settings.py snippet: STORAGES = { # rename to FILE_STORAGES to make it more explictit? 'example': { 'BACKEND':

Re: For discussion: JSON-aware views for error responses

2022-04-23 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
+1 from me - At least for 400, 500, and CSRF errors, send JSON (or empty response) > back instead of HTML if the request is xhr or has JSON headers > It's possible to detect requests for JSON with request.accepts() , which the previous PR from vanadium23 predates. There's no way to detect "if