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

14 lines
418 B
Python
Raw Normal View History

2020-07-26 22:19:37 +02:00
from django.shortcuts import render
from .models import Place
# Create your views here.
2020-07-26 23:25:07 +02:00
def place_list_view(request,):
return render(request, 'placeList.html', {'place':Place.objects.all()})
2020-07-26 22:19:37 +02:00
def place_detail_view(request, pk):
2020-07-26 23:25:07 +02:00
return render(request, 'placeOverview.html', {'place':Place.objects.get(pk=pk)})
2020-07-26 22:19:37 +02:00
def hello_world(request):
return render(request, 'hello_world.html', {'text':'Hello World!'})