diff --git a/eva/settings.py b/eva/settings.py index 6f250e0..ec840e3 100644 --- a/eva/settings.py +++ b/eva/settings.py @@ -25,6 +25,8 @@ SECRET_KEY = 'g%+i6+gkwt3zz@+k-5x1dtstuw4)&qd$lxd^bt2oswy5e1#dul' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +STATIC_ROOT = BASE_DIR / 'staticfiles' + ALLOWED_HOSTS = [] diff --git a/evapp/forms.py b/evapp/forms.py new file mode 100644 index 0000000..c09a6a9 --- /dev/null +++ b/evapp/forms.py @@ -0,0 +1,12 @@ +from django.db import models +from django.contrib.admin.widgets import AdminDateWidget +from django.forms import ModelForm + +from .models import Employee + +class EmployeeForm(ModelForm): + class Meta: + model = Employee + fields = '__all__' + widgets = {'firstdate_employment': AdminDateWidget(), + 'firstdate_presence': AdminDateWidget(),} diff --git a/evapp/templates/evapp/employee_form.html b/evapp/templates/evapp/employee_form.html index ea305c8..2d5aefd 100644 --- a/evapp/templates/evapp/employee_form.html +++ b/evapp/templates/evapp/employee_form.html @@ -1,5 +1,8 @@ + +{% load i18n %} {% load static %} + @@ -10,6 +13,7 @@ +{% block content %}