| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # coding: utf-8 |
||
| 11 | class PushbulletForm(forms.ModelForm): |
||
| 12 | |||
| 13 | """ |
||
| 14 | for to handle Todoist service |
||
| 15 | """ |
||
| 16 | type = forms.ChoiceField(widget=forms.Select( |
||
| 17 | attrs={'class': 'form-control'})) |
||
| 18 | |||
| 19 | class Meta: |
||
| 20 | model = Pushbullet |
||
| 21 | fields = ('type', 'device', 'email', 'channel_tag') |
||
| 22 | widgets = { |
||
| 23 | 'device': TextInput(attrs={'class': 'form-control'}), |
||
| 24 | 'email': TextInput(attrs={'class': 'form-control'}), |
||
| 25 | 'channel_tag': TextInput(attrs={'class': 'form-control'}), |
||
| 26 | } |
||
| 27 | |||
| 28 | def __init__(self, *args, **kwargs): |
||
| 29 | super(PushbulletForm, self).__init__(*args, **kwargs) |
||
| 30 | self.fields['type'].choices = PUSH_TYPE |
||
| 31 | |||
| 39 |