From 80f3f7f9d8c4254573d72a6586018a0da3791101 Mon Sep 17 00:00:00 2001 From: raiots Date: Sat, 10 Apr 2021 16:26:44 +0800 Subject: [PATCH] fix: fix some bugs; evaluate_factor editable in details --- .gitattributes | 1 + apps/tasks/forms.py | 4 ++-- templates/tasks/base.html | 4 ++-- templates/tasks/todo.html | 6 +++++- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..583fe84 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +static/* linguist-vendored \ No newline at end of file diff --git a/apps/tasks/forms.py b/apps/tasks/forms.py index 260b031..297c305 100644 --- a/apps/tasks/forms.py +++ b/apps/tasks/forms.py @@ -1,6 +1,7 @@ from django import forms from .models import Todo + class LoginForm(forms.Form): username = forms.CharField(error_messages={'required': '用户名不能为空'}) password = forms.CharField() @@ -12,9 +13,8 @@ class TodoForm(forms.ModelForm): class Meta: model = Todo - fields = ['maturity', 'real_work', 'complete_note'] + fields = ['maturity', 'real_work', 'evaluate_factor', 'complete_note'] labels ={'text': ''} widgets = {'rows': '3'} - # TODO 数据不可为空 \ No newline at end of file diff --git a/templates/tasks/base.html b/templates/tasks/base.html index fbc51f7..b8b79d1 100644 --- a/templates/tasks/base.html +++ b/templates/tasks/base.html @@ -53,10 +53,10 @@ scratch. This page gets rid of all links and provides the needed markup only. 年度任务 {#