[YOLO] Update for templates #1

Merged
androiddrew merged 1 commits from drew/YOLO-templates into master 1 year ago

@ -1,5 +1,6 @@
from flask import Flask
from flask import redirect
from flask import render_template
app = Flask("htmx_contact")
@ -11,4 +12,4 @@ def index():
@app.route("/contacts", methods=["GET"])
def contacts():
return "Hello HTMX"
return render_template("contacts.html", message="Hello HTMX")

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock %}
{% block scripts %}
{% endblock %}
</body>
</html>

@ -0,0 +1,5 @@
{% extends 'base.html' %}
{% block content %}
<h1>{{ message }}</h1>
{% endblock %}

@ -1,5 +1,5 @@
#! /usr/bin/env bash
set -exu
set -ex
# shellcheck source=/dev/null
source "$(dirname "$0")/_common.sh"

@ -9,4 +9,4 @@ if [ "${DRONE}" == "true" ]; then
pip install -r requirements.txt -r dev-requirements.txt
fi
exec "${VIRTUAL_ENV}/bin/python" -m pytest -vv --cov "$@"
exec "${VIRTUAL_ENV:-}/bin/python" -m pytest -vv --cov "$@"

Loading…
Cancel
Save