Add Flask webapp draft
This commit is contained in:
14
code/app/templates/base.html
Normal file
14
code/app/templates/base.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
{% if title %}
|
||||
<title>{{ title }} - IGDB</title>
|
||||
{% else %}
|
||||
<title>Welcome to IGDB</title>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<div>IGDB: <a href="/index">Home</a></div>
|
||||
<hr>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
8
code/app/templates/index.html
Normal file
8
code/app/templates/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Hi, {{ user.username }}!</h1>
|
||||
{% for post in posts %}
|
||||
<div><p>{{ post.author.username }} says: <b>{{ post.body }}</b></p></div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user