A simple flask webapp that includes user auth/login and REST API support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
1.2 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=”utf-8”>
<title>[{{ environment }}] {% if title %}{{ title }}{% else %}Home Page{% endif %}</title>
{% block styles %}
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
{% endblock %}
{% block scripts %}
{% endblock %}
</head>
<body>
<div class="container">
<h1>[{{ environment }}] Home Page</h1>
{% if current_user.is_anonymous %}
<p><a href="{{ url_for('auth.login') }}">Login</a></p>
{% endif %}
{% if current_user.is_authenticated %}
<p>Hello {{ current_user.username }}</p> <a href="{{ url_for('auth.logout') }}">Logout</a></li>
{% endif %}
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-info" role="alert">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block app_content %}{% endblock %}
</div>
</body>
</html>