2021-01-04 14:48:32 +00:00
|
|
|
from django.db import models
|
|
|
|
from django.contrib.admin.widgets import AdminDateWidget
|
2021-01-05 12:01:32 +00:00
|
|
|
from django.forms import ModelForm, DateInput
|
2021-01-04 14:48:32 +00:00
|
|
|
|
|
|
|
from .models import Employee
|
|
|
|
|
|
|
|
class EmployeeForm(ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Employee
|
|
|
|
fields = '__all__'
|
2021-01-05 12:01:32 +00:00
|
|
|
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
|
|
|
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|