Added dispalying of records
This commit is contained in:
16
worldtour/asiatoursagency/templates/tours/index.html
Normal file
16
worldtour/asiatoursagency/templates/tours/index.html
Normal 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>
|
@ -1,6 +1,8 @@
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
from .models import Tour
|
||||
|
||||
# Create your views here.
|
||||
def index(request):
|
||||
return HttpResponse("Asia Tours Agency")
|
||||
tours = Tour.objects.all()
|
||||
context = {'tours': tours}
|
||||
return render(request, 'tours/index.html', context)
|
||||
|
Reference in New Issue
Block a user