Exemplo n.º 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'}))
Exemplo n.º 2
0
 def lookups(self, request, model_admin):
     return SupportedServices.get_choices()
Exemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     super(ServiceSettingsAdminForm, self).__init__(*args, **kwargs)
     self.fields['type'] = ChoiceField(
         choices=SupportedServices.get_choices(), widget=RadioSelect)