mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 19:22:51 +02:00
Upload syntheses
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, Passage, Pool, Team, Tournament, Solution
|
||||
from .models import Participation, Passage, Pool, Team, Tournament, Solution, Synthesis
|
||||
|
||||
|
||||
class TeamForm(forms.ModelForm):
|
||||
@ -162,3 +162,14 @@ class PassageForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Passage
|
||||
fields = ('solution_number', 'place', 'defender', 'opponent', 'reporter',)
|
||||
|
||||
|
||||
class SynthesisForm(forms.ModelForm):
|
||||
def save(self, commit=True):
|
||||
"""
|
||||
Don't save a synthesis with this way. Use a view instead
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = Synthesis
|
||||
fields = ('type', 'file',)
|
||||
|
Reference in New Issue
Block a user