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