Now, the decorators in Python work from the inside out
Well I guess that depends on your definition of inside out. In your case, you want @login_required to execute first, and so it should be the “outermost” (top) decorator.
As you noted, your last example works, and is indeed the correct way to do this.
edit
The confusion might be how these particular decorators work.
@login_required(@original_view) returns a new view, which first checks if you are logged in, and then calls original_view
so
@login_required(
@active_required(
@my_view
)
)
first checks if you are logged in, then
first(second) checks if you are active, then
runs my_view