Closed kashifpk closed 9 years ago
Upon implementation, this works:
list_filter_condition = {
SensorReading.__name__: "self.model.user_id == self.request.session.get('logged_in_user', '')"
}
Need to provide the whole thing as string which is passed to python's eval function. Also to access the model, don't use the model's class name (in this case SensorReading) since that is not directly accessible inside the crud controller, instead ues self.model
Allow specifying a default SQLAlchemy filter condition for CRUD interface. The condition could be anything that can be fit into SQLAlchemy's filter method for a query. For example: