notice 등록 기능 구현

This commit is contained in:
sdjo
2025-01-17 15:41:11 +09:00
parent 150046da1d
commit 819d554bac
10 changed files with 115 additions and 11 deletions

View File

@ -5,10 +5,10 @@ from .models import Post
class PostForm(forms.ModelForm):
class Meta:
model = Post
fields = ['title', 'content', 'summary', 'tags']
fields = ['title', 'contents', 'summary', 'tags']
widgets = {
'title': forms.TextInput(attrs={'class': 'form-control'}),
'content': forms.Textarea(attrs={'class': 'form-control', 'id': 'markdown-editor'}),
'contents': forms.Textarea(attrs={'class': 'form-control', 'id': 'markdown-editor'}),
'summary': forms.TextInput(attrs={'class': 'form-control'}),
'tags': TagWidget(attrs={'class': 'form-control', 'placeholder': 'Add tags'}),
}