added template
This commit is contained in:
parent
cb0c866816
commit
313f54b5e0
@ -1,16 +1,24 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<h1 class="display-3">File Upload</h1>
|
<h1 class="display-3">File Upload</h1>
|
||||||
<br>
|
<div>
|
||||||
<form method="POST" action="" enctype="multipart/form-data">
|
<form method="POST" action="" enctype="multipart/form-data">
|
||||||
<p><input type="file" name="file" accept=".caff"></p>
|
<div class="form-group">
|
||||||
<p><input type="submit" value="Submit" class="btn btn-primary"></p>
|
<label for="caffTitle">Title: </label>
|
||||||
</form>
|
<input id="caffTitle" name="title" placeholder="My awesome animation!"/>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
<div class="form-group">
|
||||||
<p><a href="{{ url_for_security('login') }}">Log in</a> to upload an animation.</p>
|
<label for="fileChooser">CAFF File: </label>
|
||||||
{% endif %}
|
<input id="fileChooser" type="file" name="file" accept=".caff">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Upload!</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p><a href="{{ url_for_security('login') }}">Log in</a> to upload an animation.</p>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -16,3 +16,7 @@ class UploadView(FlaskView):
|
|||||||
|
|
||||||
def index(self):
|
def index(self):
|
||||||
return render_template('upload.html')
|
return render_template('upload.html')
|
||||||
|
|
||||||
|
|
||||||
|
def post(self):
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user