Files
CD_Salud/bitacora/forms.py
2025-04-17 00:29:21 -06:00

27 lines
798 B
Python

from django import forms
from .models import bitreporte
class FormBitReporte(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(FormBitReporte, self).__init__(*args, **kwargs)
self.fields['n_year'].widget.attrs['readonly'] = True
self.fields['hora'].widget.attrs['readonly'] = True
class Meta:
model = bitreporte
fields = ('n_reporte', 'n_year', 'area', 'reporte', 'quien_reporta', 'asignado', 'recibido_por', 'hora', 'pendiente', 'control_bit')
class FormBitReporteEnv(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(FormBitReporteEnv, self).__init__(*args, **kwargs)
class Meta:
model = bitreporte
fields = ('area', 'reporte', 'quien_reporta', 'asignado', 'recibido_por')