Updated tests

This commit is contained in:
2019-07-04 22:45:54 +01:00
parent 62dcad7946
commit aa2911d969
5 changed files with 61 additions and 30 deletions

View File

@@ -1,10 +1,12 @@
from flask import Flask, render_template, request
from flask_bootstrap import Bootstrap
import sqlite3
import os
import string
app = Flask(__name__)
Bootstrap(app)
def get_db_connection():

View File

@@ -1,11 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Wigan Homebrew Club Competition Entry</title>
</head>
<body>
<h1>Wigan Homebrew Club Competition Entry</h1>
<p>You have been entered into the competition to brew a {{ brew_name }}, for {{ brew_month }}. Please mark all of your bottlecaps with the following identifier: <strong>{{ identifier }}</strong></p>
</body>
</html>
{% extends "bootstrap/base.html" %}
{% block title %}Wigan Homebrew Club Competition Entry{% endblock %}
{% block content %}
<div class="container">
<div class="jumbotron text-center">
<h2>Wigan Homebrew Club Competition Entry</h2>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<p><p>You have been entered into the competition to brew a <strong>{{ brew_name }}</strong>, which will be judged at the meeting in <strong>{{ brew_month }}</strong>.</p>
<br/>
<p class="bg-success lead text-center" style="padding: 10px 10px 10px 10px">Please mark all of your bottlecaps with the following identifier: <strong>{{ identifier }}</strong></p>
</div>
</div>
</div>
{% endblock %}

View File

@@ -1,17 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Wigan Homebrew Club Competition Entry</title>
</head>
<body>
<h1>Wigan Homebrew Club Competition Entry</h1>
<p>The next competition brew will be a <strong>{{ brew_name }}</strong>. It will be judged at the meeting in <strong>{{ brew_month }}</strong></p>
<p>If you would like to enter the competition, please enter your name below to generate a letter/number that will be used to identify your entry</p>
<form action="{{ url_for('generate') }}" method="POST">
<label for="name">Please enter your name and initial (eg: Sean C):</label>
<input name="name" type="text" id="name"><br>
<button type="submit">Enter Competition</button>
</form>
</body>
</html>
{% extends "bootstrap/base.html" %}
{% block title %}Wigan Homebrew Club Competition Entry{% endblock %}
{% block content %}
<div class="container">
<div class="jumbotron text-center">
<h2>Wigan Homebrew Club Competition Entry</h2>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<p>The next competition brew will be a <strong>{{ brew_name }}</strong>. It will be judged at the meeting in <strong>{{ brew_month }}</strong></p>
<br/>
<p>If you would like to enter the competition, please enter your name below to generate a letter/number that will be used to identify your entry</p>
<hr>
<form action="{{ url_for('generate') }}" method="POST">
<div class="form-group">
<label for="name">Please enter your first name and initial (or nickname)</label>
<input name="name" type="text" id="name" class="form-control input-lg" placeholder="eg: Sean C">
</div>
<button type="submit" class="btn btn-primary">Enter Competition</button>
</form>
</div>
</div>
</div>
{% endblock %}