diff --git a/dbcontroll.py b/dbcontroll.py deleted file mode 100644 index 84388c2..0000000 --- a/dbcontroll.py +++ /dev/null @@ -1,31 +0,0 @@ -import sqlite3 -from flask import render_template -from __main__ import app - -@app.route("/database") -def database(): - con = sqlite3.connect("kver.db") - cursor = con.cursor() - - # cursor.execute("INSERT INTO movie VALUES (?, ?, ?)", ("Erster Film", 1900, 8.2)) - # con.commit() - - res = cursor.execute("SELECT name FROM sqlite_master WHERE type='table';") - - return render_template("database.html", tables=res.fetchall()) - -# !!! USER VALUE IN SQL STATEMENT !!! -@app.route("/database/") -def db_table(table): - - con = sqlite3.connect("kver.db") - cursor = con.cursor() - - # cursor.execute("INSERT INTO movie VALUES (?, ?, ?)", ("Erster Film", 1900, 8.2)) - # con.commit() - - # columns = cursor.execute("SELECT sql FROM sqlite_master WHERE type='table' AND name=?;", [table]) - # !!! USER VALUE IN SQL-STATEMENT !!! - data = cursor.execute(f"SELECT * FROM {table};") - - return render_template("database_table.html", data=data.fetchall()) diff --git a/imageupload.py b/imageupload.py deleted file mode 100644 index d992988..0000000 --- a/imageupload.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from PIL import Image -from flask import request, render_template -from __main__ import app - -@app.route("/upload", methods=['GET', 'POST']) -def upload(): - state="Nothing done..." - success=False - - if request.method == 'POST': - if 'file' not in request.files: - state='No file' - - file = request.files['file'] - - if file.filename == '': - state="No File selected!" - - if file: - filename = "uploadedfile" - file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) - state="File uploaded!" - success=True - - imagedata = [] - if success: - try: - i = Image.open("uploads/uploadedfile") - imagedata.append(i.format) - imagedata.append(i.size) - except Exception as e: - imagedata.append(e) - - - return render_template("upload.html", state=state, imagedata=imagedata) diff --git a/static/as_good_as_it_gets.jpg b/static/as_good_as_it_gets.jpg deleted file mode 100644 index 03c5baa..0000000 Binary files a/static/as_good_as_it_gets.jpg and /dev/null differ diff --git a/static/spinner.gif b/static/spinner.gif deleted file mode 100644 index 16d25c0..0000000 Binary files a/static/spinner.gif and /dev/null differ diff --git a/uploads/as_good_as_it_gets.jpg b/uploads/as_good_as_it_gets.jpg deleted file mode 100644 index 03c5baa..0000000 Binary files a/uploads/as_good_as_it_gets.jpg and /dev/null differ diff --git a/uploads/uploadedfile b/uploads/uploadedfile deleted file mode 100644 index 603b625..0000000 Binary files a/uploads/uploadedfile and /dev/null differ