I am integrating it with the Django and middleware list is not obeying the ascending order of the list. I have to add [::-1] to make it coherent.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar.
Create two middleware and add print statements in it. 1st indexed middleware will execute first and then followed by 0th index middleware
I am integrating it with the Django and middleware list is not obeying the ascending order of the list. I have to add
[::-1]
to make it coherent.Create two middleware and add print statements in it. 1st indexed middleware will execute first and then followed by 0th index middleware
These two middlewares are defined as following
Output
It should run the middleware in same order as provided in the list. For example, here is the hotfix
And now the output will be accurate
It is confusing to anyone newbie (like I was just few mins ago) to find out the apparent nature
Please tell us about your environment: