L
L
Lukmann2021-09-05 11:10:57
Django
Lukmann, 2021-09-05 11:10:57

How to make middleware only for a few routes?

How to make middleware for only a few routes in django?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antonio Solo, 2021-09-05
@solotony

there is a hook in the decorator process_view()
either use

from django.utils.decorators import method_decorator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question