Merge branch 'develop' into test
This commit is contained in:
		
						commit
						1bdbacb6d2
					
				
					 4 changed files with 18 additions and 2 deletions
				
			
		|  | @ -1200,3 +1200,13 @@ label[for=id_skola] { | |||
| .testweb .login-bar { | ||||
| 	margin-left: -20px; | ||||
| } | ||||
| 
 | ||||
| /* Produkční web z pohledu superuživatele */ | ||||
| .suprodweb { | ||||
| 	border-left: 20px solid red; | ||||
| 	border-right: 20px solid red; | ||||
| } | ||||
| 
 | ||||
| .suprodweb .login-bar { | ||||
| 	margin-left: -20px; | ||||
| } | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| 
 | ||||
| <form method=get action=../odevzdavatko> | ||||
| <form method=get action=.> | ||||
| {{ filtr.resitele }} | ||||
| {{ filtr.problemy }} | ||||
| Od: {{ filtr.reseni_od }} | ||||
|  |  | |||
|  | @ -312,12 +312,15 @@ class PrehledOdevzdanychReseni(ListView): | |||
| 		resitel = m.Resitel.objects.filter(osoba__user=self.request.user).first() | ||||
| 		qs = super().get_queryset() | ||||
| 		qs = qs.filter(reseni__resitele__in=[resitel]) | ||||
| 		# Setřídíme podle času doručení řešení, aby se netřídily podle okamžiku vyrobení Hodnocení | ||||
| 		qs = qs.order_by('reseni__cas_doruceni') | ||||
| 		return qs | ||||
| 	 | ||||
| 	def get_context_data(self, *args, **kwargs): | ||||
| 		ctx = super().get_context_data(*args, **kwargs) | ||||
| 		# Ročník určujeme podle čísla, do jehož deadlinu došlo řešení. | ||||
| 		# Chceme to mít seřazené, takže místo comphrerehsion ručně postavíme pole polí. Django templates neumí použít OrderedDict :-/ | ||||
| 		# TODO: Funkce deadline vrací deadliny v jiném ročníku, zvlášť pokud se vyrobí řešení až po deadlinu (třeba při poslání mailem) | ||||
| 		podle_rocniku = [] | ||||
| 		for rocnik, hodnoceni in groupby(ctx['object_list'], lambda ho: deadline(ho.reseni.cas_doruceni)[1].rocnik if deadline(ho.reseni.cas_doruceni) is not None else None): | ||||
| 			podle_rocniku.append((rocnik, list(hodnoceni))) | ||||
|  |  | |||
|  | @ -17,5 +17,8 @@ def april(req): | |||
| 
 | ||||
| 
 | ||||
| def rozliseni(request): | ||||
| 	return {"LOCAL_TEST_PROD": settings.LOCAL_TEST_PROD} | ||||
| 	ltp = settings.LOCAL_TEST_PROD | ||||
| 	if request.user.is_superuser and ltp == "prod": | ||||
| 		ltp = "su" + ltp | ||||
| 	return {"LOCAL_TEST_PROD": ltp} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Pavel "LEdoian" Turinsky
						Pavel "LEdoian" Turinsky