backup
parent
d88c383df2
commit
d44dc783ee
@ -0,0 +1,15 @@
|
|||||||
|
from flask import Flask, render_template, url_for, request, redirect
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/', methods=['POST', 'GET'])
|
||||||
|
def index():
|
||||||
|
if request.method == 'POST':
|
||||||
|
return 'There was an issue adding your task'
|
||||||
|
else:
|
||||||
|
return render_template('index.html')
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(debug=True)
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
body, html {
|
||||||
|
margin: 0;
|
||||||
|
font-family: sans-serif;
|
||||||
|
background-color: lightblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, td, th {
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
|
||||||
|
{% block head %}{% endblock %}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{% block body %}{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
{% extends 'base.html' %} {% block head %}
|
||||||
|
<title>Anka Anvil</title>
|
||||||
|
{% endblock %} {% block body %}
|
||||||
|
<div class="content">
|
||||||
|
<h3 style="text-align: center">Please choose an application below</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Flash Firmware</li>
|
||||||
|
<li>Create PCB Panel</li>
|
||||||
|
</ul>
|
||||||
|
<!-- <h1 style="text-align: center">Task Master</h1>
|
||||||
|
{% if tasks|length < 1 %}
|
||||||
|
<h4 style="text-align: center">There are no tasks. Create one below!</h4>
|
||||||
|
{% else %}
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Task</th>
|
||||||
|
<th>Added</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
{% for task in tasks %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ task.content }}</td>
|
||||||
|
<td>{{ task.date_created.date() }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="/delete/{{task.id}}">Delete</a>
|
||||||
|
<br>
|
||||||
|
<a href="/update/{{task.id}}">Update</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="form">
|
||||||
|
<form action="/" method="POST">
|
||||||
|
<input type="text" name="content" id="content">
|
||||||
|
<input type="submit" value="Add Task">
|
||||||
|
</form>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Loading…
Reference in New Issue