From 29c38c55d96205ab3bdb3648506a0ad59bc2a793 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 27 Jan 2021 21:17:06 -0700 Subject: [PATCH] Make the notes page work, add missing dependencies, set the font of the textarea --- setup.py | 4 +++- stickynotes/static/custom.css | 2 +- stickynotes/views.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 506840a..01dcd75 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,9 @@ setup( 'Flask-SQLAlchemy', 'Pygments', 'requests', - 'short_url' + 'short_url', + 'psycopg2_binary', + 'nord-pygments' ], extras_require={ 'dev': [ diff --git a/stickynotes/static/custom.css b/stickynotes/static/custom.css index b370cca..406e79e 100644 --- a/stickynotes/static/custom.css +++ b/stickynotes/static/custom.css @@ -27,7 +27,7 @@ body > .container { padding-left: 15px; } -code, kbd, pre, samp { +code, kbd, pre, samp, textarea#source { font-family: 'PT Mono', 'Hack', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; } diff --git a/stickynotes/views.py b/stickynotes/views.py index e10f369..37f9dae 100644 --- a/stickynotes/views.py +++ b/stickynotes/views.py @@ -61,12 +61,12 @@ def notes(): """ Show a list of recent notes """ - recent_notes = StickyNote.query\ + notes = StickyNote.query\ .filter(or_(StickyNote.expiry == None, StickyNote.expiry < datetime.utcnow()))\ .filter(~StickyNote.private)\ .order_by(StickyNote.created.desc())\ .limit(10) # noqa - return render_template('notes.html', recent=recent_notes) + return render_template('notes.html', notes=notes) @views.route('/about', methods=['GET'])