Does the order of decorators matter on a Flask view?
问题 I'm using the login_required decorator and another decorator which paginates output data. Is it important which one comes first? 回答1: While there probably won't be any problem in this case no matter what the order, you probably want login_required to execute first so that you don't make queries and paginate results that will just get thrown away. Decorators wrap the original function bottom to top, so when the function is called the wrapper added by each decorator executes top to bottom.