Fixed List View
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
<ul class="LP-Place__List">
 | 
			
		||||
    {% for place in place_list %}
 | 
			
		||||
    <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">
 | 
			
		||||
                <img class="LP-Place__Image" src="/images/photo_2020-04-09_18-27-13.jpg" />
 | 
			
		||||
                <div class="LP-Place__Assets">
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,6 @@ from .views import hello_world, place_detail_view, place_list_view
 | 
			
		||||
 | 
			
		||||
urlpatterns = [
 | 
			
		||||
    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)
 | 
			
		||||
]
 | 
			
		||||
@@ -4,7 +4,7 @@ from .models import Place
 | 
			
		||||
# Create your views here.
 | 
			
		||||
 | 
			
		||||
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):
 | 
			
		||||
    return render(request, 'placeOverview.html', {'place':Place.objects.get(pk=pk)})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user