mutable template added

This commit is contained in:
pErfEcto2
2023-05-11 11:08:00 +03:00
parent d8da3239dd
commit 8dab84f38d
15 changed files with 20 additions and 3 deletions
@@ -1,3 +1,9 @@
h1 {
color: green;
}
table, tr, th {
width: 50%;
border: 1px solid;
margin-left: auto;
margin-right: auto;
}
@@ -1,4 +1,4 @@
<!DOCTYPE <html>
<!DOCTYPE html>
<html>
<head>
{% load static %}
@@ -6,6 +6,16 @@
<title>TEST</title>
</head>
<body>
<h1>{{text}}</h1>
<h1>{{ text }}</h1>
<table>
{% for i in list %}
<tr>
<th>{{ i }}</th>
<th>{% widthratio i 1 i %}</th>
</tr>
{% endfor %}
</table>
</body>
</html>
@@ -5,7 +5,8 @@ from django.shortcuts import render
def index(request):
context = {
"text": "test"
"text": "test",
"list": range(101)
}
return HttpResponse(render(request, "polls/index.html", context))