Compare commits
No commits in common. "edcd32db4765e77afa1ebf1eda9aa1543a461bd9" and "728c282a3dfd0fb958d37ab15efaafbad6f7be19" have entirely different histories.
edcd32db47
...
728c282a3d
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,7 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
instance/
|
|
||||||
|
|
||||||
uploads/
|
uploads/
|
||||||
zip_exports/
|
zip_exports/
|
||||||
|
@ -616,34 +616,6 @@ def show_tables():
|
|||||||
tables = meta.tables
|
tables = meta.tables
|
||||||
return render_template('show_tables.html', tables=tables)
|
return render_template('show_tables.html', tables=tables)
|
||||||
|
|
||||||
@app.route("/manage_uploads")
|
|
||||||
def manage_uploads():
|
|
||||||
if not session.get("logged_in"):
|
|
||||||
return redirect("/login")
|
|
||||||
|
|
||||||
videodir = "uploads/"
|
|
||||||
videolist = os.listdir(videodir)
|
|
||||||
num_videos = len(videolist)
|
|
||||||
|
|
||||||
return render_template("manage_uploads.html", videolist=videolist, num_videos=num_videos)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/deleteuploads", methods=["POST"])
|
|
||||||
def deleteuploads():
|
|
||||||
if not session.get("logged_in"):
|
|
||||||
return redirect("/login")
|
|
||||||
|
|
||||||
print("deleting all videos")
|
|
||||||
|
|
||||||
videodir = "uploads/"
|
|
||||||
for video in os.listdir(videodir):
|
|
||||||
os.remove(os.path.join(videodir, video))
|
|
||||||
|
|
||||||
print("videos deleted")
|
|
||||||
|
|
||||||
return redirect("/all_links")
|
|
||||||
|
|
||||||
|
|
||||||
# Root page -----------------------------
|
# Root page -----------------------------
|
||||||
|
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css')}}"" /> <!-- styles.css {{ url_for('static', filename='styles.css')}}-->
|
|
||||||
<link rel=" shortcut icon" href="{{ url_for('static', filename='icons/favicon.ico') }}">
|
|
||||||
<title>DGS Avatar Study</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container" style="height: 100%; font-size: 22px;">
|
|
||||||
<h2>Upload management</h2>
|
|
||||||
|
|
||||||
<div class="textblock">
|
|
||||||
<p>
|
|
||||||
Anzahl Videos: {{ num_videos }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Die aktuellen Videos:
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% for video in videolist %}
|
|
||||||
<p>{{video}}</p>
|
|
||||||
{% endfor %}
|
|
||||||
<div class="textblock">
|
|
||||||
<p>
|
|
||||||
Download <a href="{{ url_for('export_all_videos') }}" target="_blank">hier</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<form class="dsgvoform" action="{{ url_for('deleteuploads') }}" method="post">
|
|
||||||
<label for="terms-and-conditions">
|
|
||||||
<input class="inline" id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" />
|
|
||||||
Alle Videos löschen.
|
|
||||||
</label>
|
|
||||||
<div class="button-container">
|
|
||||||
<button id="submitbutton" type="submit">Löschen</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<div class="spacer" aria-hidden="true" style="height:50px"></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
<footer>
|
|
||||||
<div class="container" style="font-size: 19px;">
|
|
||||||
<a href="{{ url_for('startpage') }}" target="_blank">Startseite</a>
|
|
||||||
<a href="{{ url_for('impressum') }}" target="_blank">Impressum</a>
|
|
||||||
<a href="{{ url_for('datenschutz') }}" target="_blank">Datenschutz</a>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user