added template

This commit is contained in:
Pünkösd Marcell 2020-11-28 03:34:15 +01:00
parent 3f73e92b21
commit 7344ebefcd
2 changed files with 24 additions and 12 deletions

View File

@ -1,16 +1,24 @@
{% extends 'base.html' %}
{% block content %}
{% if current_user.is_authenticated %}
<div class="jumbotron">
{% if current_user.is_authenticated %}
<div class="jumbotron">
<h1 class="display-3">File Upload</h1>
<br>
<div>
<form method="POST" action="" enctype="multipart/form-data">
<p><input type="file" name="file" accept=".caff"></p>
<p><input type="submit" value="Submit" class="btn btn-primary"></p>
<div class="form-group">
<label for="caffTitle">Title: </label>
<input id="caffTitle" name="title" placeholder="My awesome animation!"/>
</div>
<div class="form-group">
<label for="fileChooser">CAFF File: </label>
<input id="fileChooser" type="file" name="file" accept=".caff">
</div>
<button type="submit" class="btn btn-primary">Upload!</button>
</form>
</div>
{% else %}
<p><a href="{{ url_for_security('login') }}">Log in</a> to upload an animation.</p>
{% endif %}
</div>
</div>
{% else %}
<p><a href="{{ url_for_security('login') }}">Log in</a> to upload an animation.</p>
{% endif %}
{% endblock %}

View File

@ -16,3 +16,7 @@ class UploadView(FlaskView):
def index(self):
return render_template('upload.html')
def post(self):
pass