This commit is contained in:
parent
80fdbd2c08
commit
f9290c1664
4 changed files with 8 additions and 20 deletions
|
@ -1,7 +1,3 @@
|
||||||
"""
|
|
||||||
Index page with a list of posts.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from config import Config
|
from config import Config
|
||||||
from flask import Blueprint, render_template
|
from flask import Blueprint, render_template
|
||||||
|
|
||||||
|
@ -11,5 +7,5 @@ router = Blueprint(name, __name__)
|
||||||
|
|
||||||
@router.route("/")
|
@router.route("/")
|
||||||
def index() -> str:
|
def index() -> str:
|
||||||
"""Index page"""
|
"""index page"""
|
||||||
return render_template("index.html", config=Config, page_name=name)
|
return render_template("index.html", config=Config, page_name=name)
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
"""
|
|
||||||
Login page to an account.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from config import Config
|
from config import Config
|
||||||
from flask import Blueprint, jsonify, render_template
|
from flask import Blueprint, flash, redirect, render_template, request
|
||||||
from werkzeug import Response
|
from werkzeug import Response
|
||||||
|
|
||||||
name = __name__.split(".")[-1]
|
name = __name__.split(".")[-1]
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
"""
|
|
||||||
Read a specific post.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from config import Config
|
from config import Config
|
||||||
from flask import Blueprint, render_template
|
from flask import Blueprint, render_template
|
||||||
|
|
||||||
|
@ -11,5 +7,5 @@ router = Blueprint(name, __name__)
|
||||||
|
|
||||||
@router.route(f"/{name}")
|
@router.route(f"/{name}")
|
||||||
def read() -> str:
|
def read() -> str:
|
||||||
"""Read page"""
|
"""read page"""
|
||||||
return render_template("read.html", config=Config, page_name=name)
|
return render_template("read.html", config=Config, page_name=name)
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
</head>
|
</head>
|
||||||
{% include "header.html" %}
|
{% include "header.html" %}
|
||||||
<body>
|
<body>
|
||||||
<p>Welcome to the read page</p>
|
<main>
|
||||||
|
<!-- TODO: show a specific post -->
|
||||||
|
|
||||||
<!-- TODO: show a specific post -->
|
<!-- TODO: button to edit the post if logged -->
|
||||||
|
|
||||||
<!-- TODO: button to edit the post if logged -->
|
<!-- TODO: button to delete the post if logged -->
|
||||||
|
</main>
|
||||||
<!-- TODO: button to delete the post if logged -->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue