Opravy stylu při merge do stable
This commit is contained in:
		
							parent
							
								
									e100625d61
								
							
						
					
					
						commit
						206ddf4abe
					
				
					 3 changed files with 45 additions and 32 deletions
				
			
		|  | @ -184,7 +184,10 @@ class KorekturyView(generic.TemplateView): | ||||||
|                     zasluhy[k.autor] += 1 |                     zasluhy[k.autor] += 1 | ||||||
|                 else: |                 else: | ||||||
|                     zasluhy[k.autor] = 1 |                     zasluhy[k.autor] = 1 | ||||||
| 	zasluhy = [{'autor':jmeno, 'pocet':pocet} for (jmeno,pocet) in zasluhy.items()] |         zasluhy = [ | ||||||
|  |             {'autor': jmeno, 'pocet': pocet} | ||||||
|  |             for (jmeno, pocet) in zasluhy.items() | ||||||
|  |         ] | ||||||
|         zasluhy.sort(key=lambda z: z['pocet'], reverse=True) |         zasluhy.sort(key=lambda z: z['pocet'], reverse=True) | ||||||
| 
 | 
 | ||||||
|         strany = set(o.strana for o in opravy) |         strany = set(o.strana for o in opravy) | ||||||
|  |  | ||||||
|  | @ -72,10 +72,16 @@ urlpatterns = [ | ||||||
|         staff_member_required(views.soustredeniObalkyView), name='seminar_soustredeni_obalky'), |         staff_member_required(views.soustredeniObalkyView), name='seminar_soustredeni_obalky'), | ||||||
| 
 | 
 | ||||||
|     url(r'^tex-upload/login/$', views.LoginView, name='seminar_login'), |     url(r'^tex-upload/login/$', views.LoginView, name='seminar_login'), | ||||||
|     url(r'^tex-upload/$', staff_member_required(views.texUploadView), name='seminar_tex_upload'), |     url( | ||||||
|  |         r'^tex-upload/$', | ||||||
|  |         staff_member_required(views.texUploadView), | ||||||
|  |         name='seminar_tex_upload' | ||||||
|  |     ), | ||||||
| 
 | 
 | ||||||
|     # Ceka na autocomplete v3 |     # Ceka na autocomplete v3 | ||||||
|     #url(r'^autocomplete/organizatori/$', staff_member_required(views.OrganizatorAutocomplete.as_view()), name='seminar_autocomplete_organizator') |     # url(r'^autocomplete/organizatori/$', | ||||||
|  |     # staff_member_required(views.OrganizatorAutocomplete.as_view()), | ||||||
|  |     # name='seminar_autocomplete_organizator') | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ] | ] | ||||||
|  |  | ||||||
|  | @ -122,26 +122,31 @@ class StareNovinkyView(generic.ListView): | ||||||
| 
 | 
 | ||||||
| ### Co je M&M | ### Co je M&M | ||||||
| 
 | 
 | ||||||
| ## Organizatori | 
 | ||||||
|  | # Organizatori | ||||||
| def aktivniOrganizatori(rok=date.today().year): | def aktivniOrganizatori(rok=date.today().year): | ||||||
|     return Organizator.objects.exclude( |     return Organizator.objects.exclude( | ||||||
|         organizuje_do_roku__isnull=False, |         organizuje_do_roku__isnull=False, | ||||||
|         organizuje_do_roku__lt=rok |         organizuje_do_roku__lt=rok | ||||||
|     ).order_by('user__first_name') |     ).order_by('user__first_name') | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| class CojemamOrganizatoriView(generic.ListView): | class CojemamOrganizatoriView(generic.ListView): | ||||||
|     model = Organizator |     model = Organizator | ||||||
|     template_name = 'seminar/cojemam/organizatori.html' |     template_name = 'seminar/cojemam/organizatori.html' | ||||||
|     queryset = aktivniOrganizatori() |     queryset = aktivniOrganizatori() | ||||||
|  | 
 | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|         context = super(CojemamOrganizatoriView, self).get_context_data(**kwargs) |         context = super(CojemamOrganizatoriView, self).get_context_data(**kwargs) | ||||||
|         context['aktivni'] = True |         context['aktivni'] = True | ||||||
|         return context |         return context | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| class CojemamOrganizatoriStariView(generic.ListView): | class CojemamOrganizatoriStariView(generic.ListView): | ||||||
|     model = Organizator |     model = Organizator | ||||||
|     template_name = 'seminar/cojemam/organizatori.html' |     template_name = 'seminar/cojemam/organizatori.html' | ||||||
|     queryset = Organizator.objects.exclude(id__in = aktivniOrganizatori()).order_by('-organizuje_do_roku') |     queryset = Organizator.objects.exclude( | ||||||
|  |         id__in=aktivniOrganizatori()).order_by('-organizuje_do_roku') | ||||||
| 
 | 
 | ||||||
| ### Archiv | ### Archiv | ||||||
| 
 | 
 | ||||||
|  | @ -807,7 +812,6 @@ def texDownloadView(request, rocnik, cislo): | ||||||
|     return JsonResponse(response) |     return JsonResponse(response) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| # Ceka na autocomplete v3 | # Ceka na autocomplete v3 | ||||||
| # class OrganizatorAutocomplete(autocomplete.Select2QuerySetView): | # class OrganizatorAutocomplete(autocomplete.Select2QuerySetView): | ||||||
| # 	def get_queryset(self): | # 	def get_queryset(self): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Matěj Kocián
						Matěj Kocián