Tabulka odpovědí k Výročnímu srazu M&M
This commit is contained in:
		
							parent
							
								
									3640c756ac
								
							
						
					
					
						commit
						f3b0079651
					
				
					 3 changed files with 44 additions and 2 deletions
				
			
		
							
								
								
									
										31
									
								
								vyroci/templates/vyroci/vyroci_list.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								vyroci/templates/vyroci/vyroci_list.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | ||||||
|  | {% extends "base.html" %} | ||||||
|  | 
 | ||||||
|  | {% block content %} | ||||||
|  | 
 | ||||||
|  |   <h1>{% block nadpis1a %}M&Mí 30! odpovědi{% endblock nadpis1a %}</h1> | ||||||
|  | 
 | ||||||
|  |   <table class="dosla_reseni"> | ||||||
|  |     <tr> | ||||||
|  |       <th>Jméno</th> | ||||||
|  |       <th>Přezdívka</th> | ||||||
|  |       <th>E-mail</th> | ||||||
|  |       <th>Kdy účastník/org</th> | ||||||
|  |       <th>Co znamená M&M?</th> | ||||||
|  |       <th>Co znamená číslo?</th> | ||||||
|  |       <th>Něco dodat?</th> | ||||||
|  |     </tr> | ||||||
|  | 
 | ||||||
|  |     {% for obj in ucastnikvyroci_list %} | ||||||
|  |       <tr> | ||||||
|  |         <td style="word-break: break-all">{{ obj.jmeno }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.prezdivka }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.email }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.kdy }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.cojemam }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.cislo }}</td> | ||||||
|  |         <td style="word-break: break-all">{{ obj.dodat }}</td> | ||||||
|  |       </tr> | ||||||
|  |     {% endfor %} | ||||||
|  |   </table> | ||||||
|  | 
 | ||||||
|  | {% endblock content %} | ||||||
|  | @ -1,6 +1,7 @@ | ||||||
| from django.urls import path | from django.urls import path | ||||||
| 
 | 
 | ||||||
| from .views import VyrociView | from seminar.utils import org_required | ||||||
|  | from .views import VyrociView, VyrociListView | ||||||
| 
 | 
 | ||||||
| urlpatterns = [ | urlpatterns = [ | ||||||
| 	path( | 	path( | ||||||
|  | @ -8,4 +9,9 @@ urlpatterns = [ | ||||||
| 		VyrociView.as_view(), | 		VyrociView.as_view(), | ||||||
| 		name='vyrocni_sraz' | 		name='vyrocni_sraz' | ||||||
| 	), | 	), | ||||||
|  | 	path( | ||||||
|  | 		'sraz_vysledky/', | ||||||
|  | 		org_required(VyrociListView.as_view()), | ||||||
|  | 		name='vyrocni_sraz_vysledky' | ||||||
|  | 	), | ||||||
| ] | ] | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| from django.views.generic import FormView | from django.views.generic import FormView, ListView | ||||||
| 
 | 
 | ||||||
| from seminar.models import Osoba | from seminar.models import Osoba | ||||||
| from seminar.views import formularOKView | from seminar.views import formularOKView | ||||||
|  | @ -29,3 +29,8 @@ class VyrociView(FormView): | ||||||
| 				initial["jmeno"] = osoba.plne_jmeno() | 				initial["jmeno"] = osoba.plne_jmeno() | ||||||
| 				initial["email"] = osoba.email | 				initial["email"] = osoba.email | ||||||
| 		return initial | 		return initial | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class VyrociListView(ListView): | ||||||
|  | 	template_name = 'vyroci/vyroci_list.html' | ||||||
|  | 	model = UcastnikVyroci | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue