fix: Fixed search

This commit is contained in:
2025-07-12 07:42:58 +00:00
parent 7fb273d0ab
commit 4c6328c2e9
2 changed files with 20 additions and 1 deletions
+14
View File
@@ -19,3 +19,17 @@ EchoLog is a simple, modern homelab journal web app. It lets you document what y
## Docs
For more information, see the [Docs](https://echolog.jdbnet.co.uk).
## Environment Variables
```
MYSQL_HOST=10.10.2.27
MYSQL_USER=echolog
MYSQL_PASSWORD=gHH0&nGWK!@8Y5
MYSQL_DATABASE=echolog
SECRET_KEY=bgSNcrA0gZiRX9LbZmminf2LItEXeo
TZ=Europe/London
LOGIN_ENABLED=true
LOGIN_USERNAME=jamie
LOGIN_PASSWORD=jamieB223
```
+6 -1
View File
@@ -92,7 +92,12 @@ def search():
entries = cursor.fetchall()
cursor.close()
conn.close()
return render_template('index.html', entries=entries)
today = datetime.now(tz).date().isoformat()
now = datetime.now(tz)
page = 1
has_prev = False
has_next = False
return render_template('index.html', entries=entries, today=today, now=now, page=page, has_prev=has_prev, has_next=has_next)
@app.route('/login', methods=['GET', 'POST'])
def login():