Re: [sqlalchemy] Re: Working with func in dates, No response, no error message

2023-04-05 Thread Nancy Andeyo
gt; for the prompt response. > > On Wed, Apr 5, 2023 at 10:16 AM Lele Gaifax wrote: > >> Nancy Andeyo writes: >> >> > However, the part with problems is this one: .filter(func.strftime('%m', >> > Event.event_date = datetime.today().strftime('%m'))) whe

Re: [sqlalchemy] Re: Working with func in dates, No response, no error message

2023-04-05 Thread Nancy Andeyo
esponse. > > On Wed, Apr 5, 2023 at 10:16 AM Lele Gaifax wrote: > >> Nancy Andeyo writes: >> >> > However, the part with problems is this one: .filter(func.strftime('%m', >> > Event.event_date = datetime.today().strftime('%m'))) where the aim to &

Re: [sqlalchemy] Re: Working with func in dates, No response, no error message

2023-04-05 Thread Nancy Andeyo
> > On Wed, Apr 5, 2023 at 10:16 AM Lele Gaifax wrote: > >> Nancy Andeyo writes: >> >> > However, the part with problems is this one: .filter(func.strftime('%m', >> > Event.event_date = datetime.today().strftime('%m'))) where the aim to &

Re: [sqlalchemy] Re: Working with func in dates, No response, no error message

2023-04-05 Thread Nancy Andeyo
od. Note that I have imported the following modules from sqlalchemy import func and from datetime import datetime at the top. The event_date field in the models.py is stored as a db.DateTime with a default = datetime.utcnow. On Wed, Apr 5, 2023 at 9:07 AM Lele Gaifax wrote: > Nancy An

Re: [sqlalchemy] Re: Working with func in dates, No response, no error message

2023-04-05 Thread Nancy Andeyo
od. Note that I have imported the following modules from sqlalchemy import func and from datetime import datetime at the top. On Wed, Apr 5, 2023 at 9:07 AM Lele Gaifax wrote: > Nancy Andeyo writes: > > > the filter *.filter(func.strftime('%m', func.date(Events.date_of_event) &g

Re: [sqlalchemy] Working with func in dates, No response, no error message

2023-04-04 Thread Nancy Andeyo
I am still struggling to find the solution on this issue, the issue is with the func, because when I omit the comparison with the the func sqlachemy function, the outcome is expected. However, I want to ensure that only items for this month are displayed: he filter *.filter(func.strftime('%m',

Re: [sqlalchemy] Working with func in dates, No response, no error message

2023-04-04 Thread Nancy Andeyo
I am still struggling to find the solution on this issue, the issue is with the func, because when I omit the comparison with the func sqlalchemy function, the outcome is expected. However, I want to ensure that only items for this month are displayed: he filter *.filter(func.strftime('%m',

[sqlalchemy] Filling up a field in a database from a text file, flask

2022-08-19 Thread Nancy Andeyo
I am trying to fill up a field in a table database with contents of a text file, but get None as the response when I run the code. Any assistance will be appreciated. Here is my code: # view function - routes.py ... @app.route('/add_vlans', methods = ['GET', 'POST']) @login_required def