updated README to reflect next steps (will use flask-wtf and flask-boostrap), but proof-of-concept author/<id> works to save to database with a form / POST
This commit is contained in:
@@ -1,9 +1,44 @@
|
||||
<html>
|
||||
<body>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<h1>authors</h1>
|
||||
{% for author in authors %}
|
||||
<p>{{author.surname}}, {{author.firstnames}}</p>
|
||||
{% endfor %}
|
||||
</body>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
<script src="https://kit.fontawesome.com/9b4c7cf470.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3><center>Author</center></h3>
|
||||
<div class="container">
|
||||
{% if message|length %}
|
||||
<div class="row alert alert-success">
|
||||
{{message}}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row with-margin">
|
||||
<form class="form col-lg-12" action="" method="POST">
|
||||
<input type="hidden" name="author.id" id="author.id" value="{{author.id}}">
|
||||
<div class="input-group input-group-lg">
|
||||
<label for="{{author.firstnames}}" class="col-lg-2 col-form-label">Firstnames:</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control input-lg" name="author.firstnames" id="author.firstnames" value="{{author.firstnames}}">
|
||||
</div class="col-lg-10">
|
||||
</div class="input-group">
|
||||
<div class="input-group input-group-lg">
|
||||
<label for="{{author.surname}}" class="col-lg-2 col-form-label">Surname:</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="author.surname" id="author.surname" value="{{author.surname}}">
|
||||
</div class="col-lg-10">
|
||||
</div class="input-group">
|
||||
<div class="input-group input-group-lg">
|
||||
<div class="col-lg-2">
|
||||
<input class="btn btn-primary" type="submit" id="save" value="Save">
|
||||
</div class="col-lg-2">
|
||||
</div class="input-group input-group-lg">
|
||||
</form>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</form>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
{% if books.sub_book is defined %}
|
||||
{% if books.sub_book|length %}
|
||||
<p>sub_book is defined: {{books.sub_book}}</p>
|
||||
{% endif %}
|
||||
{{ books.subs }}
|
||||
|
||||
Reference in New Issue
Block a user