I am trying to execute a query in Peewee with results that must have a specific substring in them.
For example, if I want only actions with "Physics" in the name:
schedule = Session.select().join(Activity).where(Activity.name % "%Physics%").join(Course).join(StuCouRel).join(Student).where(Student.id == current_user.id)
The above example does not give any errors, but does not work correctly.
In python, I would just do if "Physics" in Activity.name , so I'm looking for an equivalent that I can use in a query.
source share