I'm trying to pass a function parameter as a class object but it's not working. my class is 'Users' and I want to use 'request' parameter as its object to get some data in the class.
Is it even possible?
here is my code:
def users(request, filters):
result = session.query(Users.request).filter(filters).all()
return result
When I run it I get this error:
AttributeError: type object 'Users' has no attribute 'request'
and the parameter request is unused.