lostplaces-backend/source/lostplaces/lostplaces_app/views.py

14 lines
418 B
Python

from django.shortcuts import render
from .models import Place
# Create your views here.
def place_list_view(request,):
return render(request, 'placeList.html', {'place':Place.objects.all()})
def place_detail_view(request, pk):
return render(request, 'placeOverview.html', {'place':Place.objects.get(pk=pk)})
def hello_world(request):
return render(request, 'hello_world.html', {'text':'Hello World!'})