Razeni lidi podle poctu korektur.
This commit is contained in:
		
							parent
							
								
									7a4ea302a4
								
							
						
					
					
						commit
						8671822ca0
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		|  | @ -83,8 +83,8 @@ | |||
| 	<hr/> | ||||
| 	<p> | ||||
|   Děkujeme opravovatelům: | ||||
|     {% for autor,pocet in zasluhy.items %} | ||||
|       {{autor}} ({{pocet}}){% if not forloop.last %},{% endif %} | ||||
|     {% for z in zasluhy %} | ||||
|       {{z.autor}} ({{z.pocet}}){% if not forloop.last %},{% endif %} | ||||
|     {% endfor %}</p> | ||||
| 	<hr> | ||||
| 
 | ||||
|  |  | |||
|  | @ -184,6 +184,8 @@ class KorekturyView(generic.TemplateView): | |||
|                     zasluhy[k.autor]+=1 | ||||
|                 else:  | ||||
|                     zasluhy[k.autor]=1 | ||||
| 	zasluhy = [{'autor':jmeno, 'pocet':pocet} for (jmeno,pocet) in zasluhy.items()] | ||||
| 	zasluhy.sort(key=lambda z:z['pocet'],reverse=True) | ||||
| 
 | ||||
|         strany = set(o.strana for o in opravy) | ||||
|         opravy_na_stranu = [{'strana': s, 'op_id': opravy.filter(strana=s)} for s in strany] | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue