Beispiel #1
0
 def __init__(self, *args, **kwargs):
     super(ServiceSettingsAdminForm, self).__init__(*args, **kwargs)
     self.fields['type'] = ChoiceField(
         choices=SupportedServices.get_choices(), widget=RadioSelect)
     self.fields['username'] = CharField(widget=forms.TextInput(
         attrs={'autocomplete': 'off'}))
     self.fields['password'] = CharField(widget=PasswordWidget(
         attrs={'autocomplete': 'off'}))
Beispiel #2
0
 def lookups(self, request, model_admin):
     return SupportedServices.get_choices()
Beispiel #3
0
 def __init__(self, *args, **kwargs):
     super(ServiceSettingsAdminForm, self).__init__(*args, **kwargs)
     self.fields['type'] = ChoiceField(
         choices=SupportedServices.get_choices(), widget=RadioSelect)