From 7266c46fbaeae2abc495b51c14818f1201e4cb6c Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sun, 5 Aug 2012 00:25:55 +0200 Subject: [PATCH] Use a very basic base template --- manager/templates/base.html | 10 ++++++++++ manager/templates/detail.html | 11 ++++++++--- manager/templates/index.html | 13 ++++++++++--- manager/views.py | 2 +- 4 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 manager/templates/base.html diff --git a/manager/templates/base.html b/manager/templates/base.html new file mode 100644 index 000000000..a14336032 --- /dev/null +++ b/manager/templates/base.html @@ -0,0 +1,10 @@ +{% load i18n %} + + + + {% block title %}{% endblock %} + + + {% block content %}{% endblock %} + + \ No newline at end of file diff --git a/manager/templates/detail.html b/manager/templates/detail.html index e2f1235be..faccd533a 100644 --- a/manager/templates/detail.html +++ b/manager/templates/detail.html @@ -1,6 +1,10 @@ +{% extends "base.html" %} {% load i18n %} -

{% trans "Workout for" %} {{ workout.creation_date }}

+{% block title %}{% trans "Workout for" %} {{ workout.creation_date }}{% endblock %} + +{% block content %} +

{% trans "Workout for" %} {{ workout.creation_date }}

{% endfor %} - \ No newline at end of file + +{% endblock %} \ No newline at end of file diff --git a/manager/templates/index.html b/manager/templates/index.html index 374fa5439..c0a94ab86 100644 --- a/manager/templates/index.html +++ b/manager/templates/index.html @@ -1,9 +1,16 @@ -{% if latest_poll_list %} +{% extends "base.html" %} +{% load i18n %} + +{% block title %} {% trans "Workout list" %}{% endblock %} + +{% block content %} +{% if latest_workouts_list %} {% else %}

No workouts are available.

-{% endif %} \ No newline at end of file +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/manager/views.py b/manager/views.py index efd708732..10ad5a214 100644 --- a/manager/views.py +++ b/manager/views.py @@ -21,7 +21,7 @@ from manager.models import TrainingSchedule def index(request): latest_trainings = TrainingSchedule.objects.all().order_by('-creation_date')[:5] - return render_to_response('index.html', {'latest_poll_list': latest_trainings}) + return render_to_response('index.html', {'latest_workouts_list': latest_trainings}) def add(request):