Make the notes page work, add missing dependencies, set the font of the textarea

This commit is contained in:
Raoul Snyman 2021-01-27 21:17:06 -07:00
parent 9fb69bbf64
commit 29c38c55d9
Signed by: raoul
GPG Key ID: F55BCED79626AE9C
3 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,9 @@ setup(
'Flask-SQLAlchemy',
'Pygments',
'requests',
'short_url'
'short_url',
'psycopg2_binary',
'nord-pygments'
],
extras_require={
'dev': [

View File

@ -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;
}

View File

@ -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'])