mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 13:12:17 +01:00 
			
		
		
		
	Order tables
This commit is contained in:
		@@ -30,7 +30,7 @@ class TournamentForm(forms.ModelForm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    class Meta:
 | 
					    class Meta:
 | 
				
			||||||
        model = Tournament
 | 
					        model = Tournament
 | 
				
			||||||
        fields = '__all__'
 | 
					        exclude = ('year',)
 | 
				
			||||||
        widgets = {
 | 
					        widgets = {
 | 
				
			||||||
            "price": AmountInput(),
 | 
					            "price": AmountInput(),
 | 
				
			||||||
            "date_start": DatePickerInput(),
 | 
					            "date_start": DatePickerInput(),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,6 +26,7 @@ class TournamentTable(tables.Table):
 | 
				
			|||||||
        attrs = {
 | 
					        attrs = {
 | 
				
			||||||
            'class': 'table table-condensed table-striped table-hover'
 | 
					            'class': 'table table-condensed table-striped table-hover'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        order_by = ('date_start', 'name',)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TeamTable(tables.Table):
 | 
					class TeamTable(tables.Table):
 | 
				
			||||||
@@ -40,6 +41,7 @@ class TeamTable(tables.Table):
 | 
				
			|||||||
        attrs = {
 | 
					        attrs = {
 | 
				
			||||||
            'class': 'table table-condensed table-striped table-hover'
 | 
					            'class': 'table table-condensed table-striped table-hover'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        order_by = ('-validation_status', 'trigram',)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SolutionTable(tables.Table):
 | 
					class SolutionTable(tables.Table):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -427,7 +427,8 @@ class PoolListView(LoginRequiredMixin, SingleTableView):
 | 
				
			|||||||
            qs = qs.filter(Q(juries=user) | Q(teams__tournament__organizers=user))
 | 
					            qs = qs.filter(Q(juries=user) | Q(teams__tournament__organizers=user))
 | 
				
			||||||
        elif user.participates:
 | 
					        elif user.participates:
 | 
				
			||||||
            qs = qs.filter(teams=user.team)
 | 
					            qs = qs.filter(teams=user.team)
 | 
				
			||||||
        return qs.distinct()
 | 
					        qs = qs.distinct().order_by('teams__tournament__date_start', 'teams__tournament__name', 'round',)
 | 
				
			||||||
 | 
					        return qs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PoolCreateView(AdminMixin, CreateView):
 | 
					class PoolCreateView(AdminMixin, CreateView):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,6 +157,8 @@ USE_TZ = True
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
 | 
					LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FIXTURE_DIRS = [os.path.join(BASE_DIR, "tfjm/fixtures")]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Static files (CSS, JavaScript, Images)
 | 
					# Static files (CSS, JavaScript, Images)
 | 
				
			||||||
# https://docs.djangoproject.com/en/3.0/howto/static-files/
 | 
					# https://docs.djangoproject.com/en/3.0/howto/static-files/
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user