Replies: 2 comments 2 replies
-
Hey, in which method do you exactly need to access the request object? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I don't have an example, but how about copying the request object, either in the route or in middleware, to a contextvar? Then it can be accessed from any function at the class level. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a class that inherits from the ModelView class and uses a custom wtform with a SelectMultipleField.
This SelectMultipleField is a relation to another Model, however I need to filter out the choices that are shown in this model based on an attribute I have set in the request.session. How can I achieve this?
Beta Was this translation helpful? Give feedback.
All reactions