mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Use a very basic base template
This commit is contained in:
10
manager/templates/base.html
Normal file
10
manager/templates/base.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% load i18n %}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
<h1>{% trans "Workout for" %} {{ workout.creation_date }}</h1>
|
||||
{% block title %}{% trans "Workout for" %} {{ workout.creation_date }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> {% trans "Workout for" %} {{ workout.creation_date }}</h1>
|
||||
<ul>
|
||||
{% for day in workout.day_set.all %}
|
||||
<li>
|
||||
@@ -24,7 +28,7 @@
|
||||
{% endfor %}
|
||||
-->
|
||||
|
||||
{% for setting in exercise.setting_set.all %}
|
||||
{% for setting in exercise.setting_set.filter %}
|
||||
{{ set.sets }} x <!--x {{setting.reps}} @ {{setting.weight}}-->
|
||||
|
||||
{% for individual_setting in setting.individual_exercises.all %}
|
||||
@@ -40,4 +44,5 @@
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -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 %}
|
||||
<ul>
|
||||
{% for workout in latest_poll_list %}
|
||||
{% for workout in latest_workouts_list %}
|
||||
<li><a href="/workout/{{ workout.id }}/view">{{ workout.creation_date }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>No workouts are available.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user