[Fixed]-Apply Custom decorator to dispatch in Django view?

1👍

This is covered in the docs. You can do one of the following:

decorators = [login_required, is_envlocked]
@method_decorator(decorators)
def dispatch(self, request, envid):

Or use method_decorator() multiple times:

@method_decorator(login_required)
@method_decorator(is_envlocked)
def dispatch(self, request, envid):

Leave a comment