Adding an about section, version number and license

This commit is contained in:
Yusur 2019-10-09 19:51:18 +02:00
parent 7de3832fe7
commit 7864cc6467
3 changed files with 44 additions and 0 deletions

6
app.py
View file

@ -6,6 +6,8 @@ from peewee import *
import datetime, time, re, os, sys, string, json
from functools import wraps
__version__ = '0.4-dev'
DATABASE = 'coriplus.sqlite'
DEBUG = True
SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b'
@ -424,6 +426,10 @@ def notifications():
.execute())
return object_list('notifications.html', notifications, 'notification_list', json=json, User=User)
@app.route('/about/')
def about():
return render_template('about.html', version=__version__)
@app.route('/uploads/<id>.jpg')
def uploads(id, type='jpg'):
return send_from_directory(UPLOAD_DIRECTORY, id + '.' + type)