Merge branch 'master' of mowoe.com:reverend/lostplaces-backend
This commit is contained in:
commit
e2a26d45ae
@ -4,7 +4,7 @@
|
|||||||
<ul class="LP-Place__List">
|
<ul class="LP-Place__List">
|
||||||
{% for place in place_list %}
|
{% for place in place_list %}
|
||||||
<li class="LP-Place__Item">
|
<li class="LP-Place__Item">
|
||||||
<a href="{% url 'place_detail' pk=place.id %}" class="LP-Link">
|
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
|
||||||
<article class="LP-Place">
|
<article class="LP-Place">
|
||||||
<img class="LP-Place__Image" src="/images/photo_2020-04-09_18-27-13.jpg" />
|
<img class="LP-Place__Image" src="/images/photo_2020-04-09_18-27-13.jpg" />
|
||||||
<div class="LP-Place__Assets">
|
<div class="LP-Place__Assets">
|
||||||
|
@ -3,6 +3,6 @@ from .views import hello_world, place_detail_view, place_list_view
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('hello_world/', hello_world),
|
path('hello_world/', hello_world),
|
||||||
path('place/<int:pk>/', place_detail_view),
|
path('place/<int:pk>/', place_detail_view, name='place_detail'),
|
||||||
path('places/', place_list_view)
|
path('places/', place_list_view)
|
||||||
]
|
]
|
@ -4,7 +4,7 @@ from .models import Place
|
|||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
def place_list_view(request,):
|
def place_list_view(request,):
|
||||||
return render(request, 'placeList.html', {'place':Place.objects.all()})
|
return render(request, 'placeList.html', {'place_list':Place.objects.all()})
|
||||||
|
|
||||||
def place_detail_view(request, pk):
|
def place_detail_view(request, pk):
|
||||||
return render(request, 'placeOverview.html', {'place':Place.objects.get(pk=pk)})
|
return render(request, 'placeOverview.html', {'place':Place.objects.get(pk=pk)})
|
||||||
|
Loading…
Reference in New Issue
Block a user