10 lines
287 B
Python
10 lines
287 B
Python
from django import forms
|
|
from .models import Message
|
|
|
|
class MessageForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Message
|
|
fields = ['title', 'text', 'send_time']
|
|
widgets = {
|
|
'send_time': forms.DateTimeInput(attrs={'type': 'datetime-local'}),
|
|
} |