mirror of
https://github.com/adrigongv23/G26---Telemetry-Software.git
synced 2026-08-25 11:33:17 +02:00
Sección Pruebas añadida
This commit is contained in:
parent
1d1c7a61e9
commit
6100199e9c
8 changed files with 444 additions and 3 deletions
22
Plataform_Web/pruebas/forms.py
Normal file
22
Plataform_Web/pruebas/forms.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from django import forms
|
||||
from .models import Prueba, Telemetria
|
||||
|
||||
|
||||
class PruebaForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Prueba
|
||||
fields = ['nombre', 'descripcion', 'fecha_inicio', 'fecha_fin', 'categoria', 'resultados', 'temporada']
|
||||
widgets = {
|
||||
'fecha_inicio': forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}),
|
||||
'fecha_fin': forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}),
|
||||
}
|
||||
|
||||
|
||||
class TelemetriaForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Telemetria
|
||||
fields = ['nombre', 'archivo_csv']
|
||||
widgets = {
|
||||
'nombre': forms.TextInput(attrs={'class': 'form-control form-control-sm'}),
|
||||
'archivo_csv': forms.ClearableFileInput(attrs={'class': 'form-control form-control-sm'}),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue