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