Answer the question
In order to leave comments, you need to log in
Why forgive the correct format of the DataTime field?
model.py
enterDateTime = models.DateTimeField(blank=True, null=True)
enterDateTime = forms.DateTimeField(widget=forms.DateTimeInput(
attrs={'class': 'btn btn-sm btn-outline-primary bg-light col-8 text-dark', 'style': 'text-align: left',
'type': 'datetime-local'}), required=False)
formAddForm003y_str1 = addForm003y_str1(request.POST or None, initial={'surName': patient.surName,
'firstName': patient.firstName,
'secondName': patient.secondName,
'dateOfBirth': datetime.strftime(
patient.dateOfBirth, "%Y-%m-%d"),
'enterDateTime': format(datetime.today(),
'%Y-%m-%dT%H:%M'),
'sex': patient.sex,
'diagnosis_directed': inpatientcard.protocolOfCommission.diagnosis,
'diagnosis_entered': inpatientcard.protocolOfCommission.diagnosis,
'diagnosis': inpatientcard.protocolOfCommission.diagnosis,
'mkb': inpatientcard.protocolOfCommission.mkb})
{{ formAddForm003y_str1.enterDateTime.errors }}
<label for="{{ formAddForm003y_str1.enterDateTime.id_for_label }}"
class="col-3">Дата и время поступления:</label>
{{ formAddForm003y_str1.enterDateTime }}
Answer the question
In order to leave comments, you need to log in
turn on debugging in sessions and look at the logs
at a glance - you don't have seconds
If the monitor is no longer under warranty, you can disassemble it yourself. First of all, with this inclusion, the fuse should have burned out. It is not difficult to replace it yourself, and its price is 10 rubles, no more ... If the monitor is under warranty, do not hesitate to contact the service center.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question