🎉 Huge update, added Python virtualenv, updated dependencies...

This commit is contained in:
Finn Christiansen 2023-11-07 20:28:19 +01:00
parent fc8697f1a2
commit fdbb29fb5a
6 changed files with 30 additions and 3 deletions

14
.gitignore vendored Normal file
View file

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

View file

@ -28,7 +28,7 @@
WSGIScriptReloading On WSGIScriptReloading On
WSGIPassAuthorization On WSGIPassAuthorization On
Alias /static/ /var/www/vhosts/reminder.pimux.de/static/ Alias /static/ /var/www/vhosts/reminder.pimux.de/app/static/
<Directory /var/www/vhosts/reminder.pimux.de/> <Directory /var/www/vhosts/reminder.pimux.de/>
WSGIProcessGroup reminder WSGIProcessGroup reminder

View file

@ -3,7 +3,7 @@ from icalendar import Calendar, Alarm
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired from flask_wtf.file import FileField, FileRequired
from wtforms import IntegerField, SubmitField from wtforms import IntegerField, SubmitField
from wtforms.widgets.html5 import NumberInput from wtforms.widgets import NumberInput
import tempfile import tempfile
index = Blueprint('index', __name__, template_folder='templates') index = Blueprint('index', __name__, template_folder='templates')
@ -41,7 +41,7 @@ def addreminder():
new_ics = tempfile.TemporaryFile() new_ics = tempfile.TemporaryFile()
new_ics.write(calendar.to_ical()) new_ics.write(calendar.to_ical())
new_ics.seek(0) 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, return send_file(new_ics, as_attachment=True,
attachment_filename=new_filename) attachment_filename=new_filename)

13
requirements.txt Normal file
View file

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