Django Middleware process_view
view_func
is not the one described
#696
Unanswered
Real-Gecko
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a middleware that either processes request as usual or redirects to predefined view depending on number of factors.
It does so by analyzing
view_func
parameter ofprocess_view
function:With ordinary Django views I usually get the proper class for the view like
<class 'core.views.Index'>
etc.However NinjaAPI
view_func
s are all of class<bound method PathView._sync_view of <ninja.operation.PathView object at 0x7fcb427c7ca0>>
.And it completely breaks the logic of my middleware.
Is there a way to get the actual function that processes the logic so my middleware would work as expected?
Beta Was this translation helpful? Give feedback.
All reactions