Revision 83bedd6f
Added by Serghei Mihai over 9 years ago
| corbo/forms.py | ||
|---|---|---|
|
model = Announce
|
||
|
fields = '__all__'
|
||
|
widgets = {
|
||
|
'publication_time': forms.TextInput(attrs={'class': 'datepicker',
|
||
|
'size': 8}),
|
||
|
'expiration_time': forms.TextInput(attrs={'class': 'datepicker',
|
||
|
'size': 8})
|
||
|
'publication_time': forms.TextInput(attrs={'class': 'datetimepicker',
|
||
|
'readonly': True}),
|
||
|
'expiration_time': forms.TextInput(attrs={'class': 'datetimepicker',
|
||
|
'readonly': True})
|
||
|
}
|
||
|
fields = '__all__'
|
||
|
|
||
|
def save(self, *args, **kwargs):
|
||
|
instance = super(AnnounceForm, self).save(*args, **kwargs)
|
||
Also available in: Unified diff
use datetime picker for announce publish and expiration dates