From fdbb29fb5a4f691471f6715d807518bfb1daebe4 Mon Sep 17 00:00:00 2001 From: Finn Christiansen Date: Tue, 7 Nov 2023 20:28:19 +0100 Subject: [PATCH] :tada: Huge update, added Python virtualenv, updated dependencies... --- .gitignore | 14 ++++++++++++++ apache_sample_config.conf | 2 +- app/index.py | 4 ++-- {static => app/static}/css/style.css | 0 {static => app/static}/js/reminder.js | 0 requirements.txt | 13 +++++++++++++ 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .gitignore rename {static => app/static}/css/style.css (100%) rename {static => app/static}/js/reminder.js (100%) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcca7ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Virtualenv +# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +.Python +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts +pyvenv.cfg +.venv +pip-selfcheck.json +__pycache__ +tags diff --git a/apache_sample_config.conf b/apache_sample_config.conf index 0d51ba0..c531cc7 100644 --- a/apache_sample_config.conf +++ b/apache_sample_config.conf @@ -28,7 +28,7 @@ WSGIScriptReloading On WSGIPassAuthorization On - Alias /static/ /var/www/vhosts/reminder.pimux.de/static/ + Alias /static/ /var/www/vhosts/reminder.pimux.de/app/static/ WSGIProcessGroup reminder diff --git a/app/index.py b/app/index.py index 6f66ec2..2f0d040 100644 --- a/app/index.py +++ b/app/index.py @@ -3,7 +3,7 @@ from icalendar import Calendar, Alarm from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileRequired from wtforms import IntegerField, SubmitField -from wtforms.widgets.html5 import NumberInput +from wtforms.widgets import NumberInput import tempfile index = Blueprint('index', __name__, template_folder='templates') @@ -41,7 +41,7 @@ def addreminder(): new_ics = tempfile.TemporaryFile() new_ics.write(calendar.to_ical()) new_ics.seek(0) - new_filename = file.filename.rstrip('.ics')+'_with_reminders'+'.ics' + new_filename = file.filename.rstrip('.ics') + '_with_reminders' + '.ics' return send_file(new_ics, as_attachment=True, attachment_filename=new_filename) diff --git a/static/css/style.css b/app/static/css/style.css similarity index 100% rename from static/css/style.css rename to app/static/css/style.css diff --git a/static/js/reminder.js b/app/static/js/reminder.js similarity index 100% rename from static/js/reminder.js rename to app/static/js/reminder.js diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f60acb3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +blinker==1.7.0 +click==8.1.7 +Flask==3.0.0 +Flask-WTF==1.2.1 +icalendar==5.0.11 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 +python-dateutil==2.8.2 +pytz==2023.3.post1 +six==1.16.0 +Werkzeug==3.0.1 +WTForms==3.1.1