diff --git a/.gitignore b/.gitignore index 0518c51..9bcb4ac 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ venv/ env/ .venv/ -.pyc +*.pyc # 数据库文件 db.sqlite3 diff --git a/core/__pycache__/forms.cpython-313.pyc b/core/__pycache__/forms.cpython-313.pyc index 61454b3..bf01b5a 100644 Binary files a/core/__pycache__/forms.cpython-313.pyc and b/core/__pycache__/forms.cpython-313.pyc differ diff --git a/core/__pycache__/urls.cpython-313.pyc b/core/__pycache__/urls.cpython-313.pyc index 84b50cc..613685e 100644 Binary files a/core/__pycache__/urls.cpython-313.pyc and b/core/__pycache__/urls.cpython-313.pyc differ diff --git a/core/__pycache__/views.cpython-313.pyc b/core/__pycache__/views.cpython-313.pyc index 5be0e97..af19e40 100644 Binary files a/core/__pycache__/views.cpython-313.pyc and b/core/__pycache__/views.cpython-313.pyc differ diff --git a/core/forms.py b/core/forms.py index 6b7d8d6..6f02b10 100644 --- a/core/forms.py +++ b/core/forms.py @@ -28,7 +28,7 @@ class InsightRecordForm(forms.ModelForm): model = InsightRecord fields = ['content', 'file'] widgets = { - 'content': forms.Textarea(attrs={'class': 'form-control', 'rows': 5, 'placeholder': '请输入今日感悟'}), + 'content': forms.Textarea(attrs={'class': 'form-control', 'rows': 5, 'placeholder': '请输入感悟'}), 'file': forms.FileInput(attrs={'class': 'form-control'}), } diff --git a/core/templates/core/index.html b/core/templates/core/index.html index 943e9b6..08836ff 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -61,19 +61,20 @@ -
| 类型 | +标题 | +来源 | +进度 | +笔记 | +操作 | +
|---|---|---|---|---|---|
| {{ reading.get_type_display }} | +{{ reading.title }} | +{{ reading.source|default:"-" }} | +{{ reading.progress|default:"-" }} | +{{ reading.note|truncatechars:50|default:"-" }} | ++ {% if reading.file %} + + + + {% endif %} + + + + + + + | +
今日没有阅读记录,点击上方按钮添加
+ {% endif %} +