12 lines
373 B
Python
12 lines
373 B
Python
from django import forms
|
|
from .models import NoticeBoard
|
|
|
|
class PostForm(forms.ModelForm):
|
|
class Meta:
|
|
model = NoticeBoard
|
|
fields = ['title', 'contents']
|
|
widgets = {
|
|
'title': forms.TextInput(attrs={'class': 'form-control'}),
|
|
'contents': forms.Textarea(attrs={'class': 'form-control', 'id': 'markdown-editor'}),
|
|
}
|