Added a basic place_view
This commit is contained in:
		@@ -16,7 +16,6 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
        <article>
 | 
					        <article>
 | 
				
			||||||
                {{> @headline headline='Map Links'}}
 | 
					 | 
				
			||||||
                <a class="LP-Link" href="https://www.google.com/maps?q={{place.latitude}},{{place.longitude}}" target="blank"><span class="LP-Text">Google Maps</span></a>
 | 
					                <a class="LP-Link" href="https://www.google.com/maps?q={{place.latitude}},{{place.longitude}}" target="blank"><span class="LP-Text">Google Maps</span></a>
 | 
				
			||||||
                <a class="LP-Link" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude}},{{place.longitude}}&icon=true&bg=dop" target="blank"><span class="LP-Text">TIM Online (GER/NRW Only)</span></a>
 | 
					                <a class="LP-Link" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude}},{{place.longitude}}&icon=true&bg=dop" target="blank"><span class="LP-Text">TIM Online (GER/NRW Only)</span></a>
 | 
				
			||||||
                <a class="LP-Link" href="http://www.openstreetmap.org/?mlat={{place.latitude}}&mlon={{place.longitude}}&zoom=16" target="blank"><span class="LP-Text">Open Street Map</span></a>
 | 
					                <a class="LP-Link" href="http://www.openstreetmap.org/?mlat={{place.latitude}}&mlon={{place.longitude}}&zoom=16" target="blank"><span class="LP-Text">Open Street Map</span></a>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								source/lostplaces/lostplaces_app/urls.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								source/lostplaces/lostplaces_app/urls.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					from django.urls import path
 | 
				
			||||||
 | 
					from .views import hello_world, place_detail_view
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					urlpatterns = [
 | 
				
			||||||
 | 
					    path('hello_world/', hello_world),
 | 
				
			||||||
 | 
					    path('place/<int:pk>/', place_detail_view)
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
							
								
								
									
										11
									
								
								source/lostplaces/lostplaces_app/views.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								source/lostplaces/lostplaces_app/views.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					from django.shortcuts import render
 | 
				
			||||||
 | 
					from .models import Place
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create your views here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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!'})
 | 
				
			||||||
		Reference in New Issue
	
	Block a user