<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Students Record</title>
</head>
<body>
<h2>School Grading System</h2>
<hr/>
<a href="/student">Students</a> |
<a href="#">Subjects</a> |
<a href="#">Instructor</a> |
<a href="#">Score Sheet</a>
<hr/>
<h2>See Student Record</h2>
<a href="/">Back to home</a><br/>
....
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
School Grading System - {% block title %}{% endblock title %}
</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header>
<h1>School Grading System</h1>
</header>
<nav>
<a href="/">Home</a>
<a href="student">Add Student</a>
<a href="seestudents">See Students</a>
</nav>
<div class="container">
<h2> {% block subheading %}{% endblock subheading %}</h2>
{% block content %}
<p>No messages.</p>
{% endblock content %}
</div>
<footer>
Designed and Developed Ben Onuorah
</footer>
</body>
</html>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: white;
padding: 10px 20px;
text-align: center;
}
nav {
background-color: #444;
padding: 10px 0;
text-align: center;
}
nav a {
color: white;
text-decoration: none;
padding: 10px 20px;
}
nav a:hover {
background-color: #666;
}
.container {
max-width: 800px;
margin: 20px auto;
padding: 0 20px;
}
h1, h2 {
margin-bottom: 10px;
}
p {
margin-bottom: 20px;
}
footer {
background-color: #333;
color: white;
padding: 10px 20px;
text-align: center;
}
{% extends 'layout.html' %}
{% block title %}Welcome{% endblock title %}
<h2>
{% block subheading %}Home{% endblock subheading %}</h2>
{% block content %}
<p>
Welcome to my web app
</p>
{% endblock content %}
<!DOCTYPE html>
{% extends 'layout.html' %}
{% block title %}Add Student{% endblock title %}
<h2>
{% block subheading %}Add Student{% endblock subheading %}</h2>
{% block content %}
{% if msg %}
<p><b>{{ msg }}</b></p>
{% endif %}
<form method="POST" action ="/addstudent">
Surname: <br/>
<input type="text" name="surname" />
<br/>
Other names: <br/>
<input type="text" name="othernames" />
<br/>
Address: <br/>
<textarea name="address"></textarea>
<br/>
<input type="submit" name="Save"/>
</form>
{% endblock content %}
<!DOCTYPE html>
{% extends 'layout.html' %}
{% block title %}See Students{% endblock title %}
<h2>
{% block subheading %}See Students{% endblock subheading %}</h2>
{% block content %}
<table width="100%" border=1>
<tr>
<th>Id</th>
<th>Surname</th>
<th>Othernames</th>
<th>Address</th>
</tr>
{%for rec in students%}
<tr>
<td>{{rec[0]}}</td>
<td>{{rec[1]}}</td>
<td>{{rec[2]}}</td>
<td>{{rec[3]}}</td>
</tr>
{%endfor%}
</table>
{% endblock content %}
No Comment yet!