mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-08-07 02:39:44 +02:00
Upload solution is working
This commit is contained in:
@@ -9,7 +9,7 @@ from django.core.exceptions import ValidationError
|
||||
from django.utils import formats
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .models import Participation, Team, Tournament
|
||||
from .models import Participation, Team, Tournament, Solution
|
||||
|
||||
|
||||
class TeamForm(forms.ModelForm):
|
||||
@@ -112,3 +112,14 @@ class TournamentForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Tournament
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
class SolutionForm(forms.ModelForm):
|
||||
def save(self, commit=True):
|
||||
"""
|
||||
Don't save a solution with this way. Use a view instead
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = Solution
|
||||
fields = ('problem', 'file',)
|
||||
|
Reference in New Issue
Block a user