Closed null-none closed 8 years ago
I commented on your PR. Tests are failing right now. This can't be merged.
Well the middleware in fact does remove session and user data, along with some other attributes I suppose. Not sure how this went unnoticed for so long. Will be fixed asap.
:+1:
Well actually user and session attributes are added in Session and Authenticaton middlewares. So if you use DjangularMiddleware correctly (first in MIDDLEWARE_CLASSES - that's what you are doing wrong) everyting works properly.
Either way I'd merge the new version of request building, since it's more robust and future-proof. Also I added code to remove djng_url_kwargs from query string.
After creating
new_request
in djangular/middleware.py, attributes user and session (at least) are lost. A new request is created and these attributes are dropped. We should kept user and session for correct use (especially with multiple middlewares).