Re: [sqlalchemy] iterate sqlalchemy query over for loop in my template python-flask

2022-10-25 Thread Abdellah ALAOUI ISMAILI
you are getting back: > > > https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine.params.echo > > Are you sure that the database actually contains colours for those tags? > > Simon > > On Sat, Oct 22, 2022 at 3:37 PM Abdellah ALAOUI ISMAILI

Re: [sqlalchemy] iterate sqlalchemy query over for loop in my template python-flask

2022-10-22 Thread Abdellah ALAOUI ISMAILI
and what is the output from the template? > > Simon > > On Thu, Oct 20, 2022 at 9:05 AM Abdellah ALAOUI ISMAILI < > my.ala...@gmail.com> wrote: > >> Hello, >> I call a function in my template that returns sqlalchemy query result, >> (color value from the name o

[sqlalchemy] iterate sqlalchemy query over for loop in my template python-flask

2022-10-20 Thread Abdellah ALAOUI ISMAILI
Hello, I call a function in my template that returns sqlalchemy query result, (color value from the name of the tag). this is the query function : *def get_tag_color(name): * *return db.session.query(Tag.tag_color).filter(Tag.tag_name == name).scalar() * and I call it in my template file: * {%