Added dispalying of records
This commit is contained in:
@ -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