--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('books', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Person',
+ fields=[
+ ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
+ ('name', models.CharField(max_length=200)),
+ ],
+ options={
+ },
+ bases=(models.Model,),
+ ),
+ migrations.AlterField(
+ model_name='lease',
+ name='leasee',
+ field=models.ForeignKey(to='books.Person'),
+ preserve_default=True,
+ ),
+ ]
--- /dev/null
+* {
+ font-family: Arial;
+}
--- /dev/null
+<!DOCTYPE html>
+<html lang="de">
+<head>
+ {% load staticfiles %}
+ <link rel="stylesheet" type="text/css" href="{% static 'books/style.css' %}" />
+ <title>{% block title %}Titel{% endblock %}</title>
+</head>
+<body>
+ <div id="content">{% block content %}{% endblock %}</div>
+</body>
+</html>
+{% extends "base_generic.html" %}
+
+{% block title %}Urte's Bücher{% endblock %}
+
+{% block content %}
<a href="{% url 'persons' %}">Personen</a>
<div>
{% if book_list %}
<input type="submit" value="Neues Buch" />
</form>
</div>
+{% endblock %}
-Leihe {{ book }} an
+{% extends 'base_generic.html' %}
+
+ {% block title %}
+Leihe »{{ book }}« an
+{% endblock %}
+
+{% block content %}
+Leihe »{{ book }}« an
<form action="{% url 'lease_book' book.id %}" method="post">
{% csrf_token %}
<input type="text" name="leasee" />
<input type="submit" value="Verleihe" />
</form>
+{% endblock %}
+{% extends 'base_generic.html' %}
+
+{% block title %}
+Liste der Ausleiher
+{% endblock %}
+
+{% block content %}
<a href="{% url 'index' %}">Bücher</a>
<div>
{% if person_list %}
Keine Personen eingetragen.
{% endif %}
</div>
+{% endblock %}
+{% extends 'base_generic.html' %}
+
+{% block title %}Buch wurde zurückgegeben{% endblock %}
+
+{% block content %}
<a href="{% url 'index' %}">
{{ lease.leasee }} returned »{{ lease.book }}«.
</a>
+{% endblock %}