add detail view
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								7f7e5be1c6
							
						
					
				
			
			
				commit
				
					
						9350814f57
					
				
			
		
					 4 changed files with 25 additions and 4 deletions
				
			
		|  | @ -1,11 +1,21 @@ | |||
| from django.shortcuts import render | ||||
| 
 | ||||
| from django.shortcuts import render | ||||
| from django.shortcuts import get_object_or_404, render | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| from .models import Message | ||||
| 
 | ||||
| 
 | ||||
| def detail(request): | ||||
|     pass | ||||
| 
 | ||||
| def detail(request, message_id): | ||||
|     p = get_object_or_404(Message, pk=message_id) | ||||
| 
 | ||||
|     context = { 'message': p, } | ||||
|     return render(request, 'digital_glarus/detail.html', context) | ||||
| 
 | ||||
| def send_message(request): | ||||
|     pass | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue