Added dispalying of records

This commit is contained in:
2025-05-29 14:54:14 -04:00
parent 8270549d68
commit 5f2faa6dcc
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport>" content="width=device-width, initial-scale=1.0">
<title>Asia Tours</title>
</head>
<body>
<h1>Asia Tours Schedule for June 2025</h1>
<ul>
{% for tour in tours %}
<li>{{tour}}</li>
{% endfor %}
</ul>
</body>
</html>

View File

@ -1,6 +1,8 @@
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse from .models import Tour
# Create your views here. # Create your views here.
def index(request): def index(request):
return HttpResponse("Asia Tours Agency") tours = Tour.objects.all()
context = {'tours': tours}
return render(request, 'tours/index.html', context)