From 7864cc6467a8d93f97d50af2118c37271ad8c84b Mon Sep 17 00:00:00 2001 From: Mattia Succurro Date: Wed, 9 Oct 2019 19:51:18 +0200 Subject: [PATCH] Adding an about section, version number and license --- LICENSE | 5 +++++ app.py | 6 ++++++ templates/about.html | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 LICENSE create mode 100644 templates/about.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1f95d26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,5 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/app.py b/app.py index b078c40..b30cd51 100644 --- a/app.py +++ b/app.py @@ -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/.jpg') def uploads(id, type='jpg'): return send_from_directory(UPLOAD_DIRECTORY, id + '.' + type) diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..79c797d --- /dev/null +++ b/templates/about.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block body %} +

About Coriplus

+ +

Version: {{ version }}

+

Copyright © 2019 Sakuragasaki46.

+ +

License

+

Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:

+ +

The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software.

+ +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ +

Source code for this site: + https://github.com/sakuragasaki46/coriplus/ + +{% endblock %}