예제 #1
0
    def __init__(self, *args, **kwargs):

        super(UserForm, self).__init__(*args, **kwargs)

        emails = get_all_user_mails(self.instance)

        self.fields['email'].choices = [(x, x) for x in sorted(emails)]
        self.fields['username'].valid = self.instance.username
예제 #2
0
파일: forms.py 프로젝트: daleathan/weblate
    def __init__(self, *args, **kwargs):

        super(UserForm, self).__init__(*args, **kwargs)

        emails = get_all_user_mails(self.instance)

        self.fields['email'].choices = [(x, x) for x in sorted(emails)]
        self.fields['username'].valid = self.instance.username
예제 #3
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        emails = get_all_user_mails(self.instance.user)
        emails.add("")

        self.fields["public_email"].choices = [(x, x) for x in sorted(emails)]
        self.helper = FormHelper(self)
        self.helper.disable_csrf = True
        self.helper.form_tag = False
예제 #4
0
파일: forms.py 프로젝트: sunner/weblate
    def __init__(self, *args, **kwargs):
        super(UserForm, self).__init__(*args, **kwargs)

        emails = get_all_user_mails(self.instance)

        self.fields['email'].choices = [(x, x) for x in sorted(emails)]
        self.fields['username'].valid = self.instance.username

        self.helper = FormHelper(self)
        self.helper.disable_csrf = True
        self.helper.form_tag = False
예제 #5
0
파일: forms.py 프로젝트: dekoza/weblate
    def __init__(self, *args, **kwargs):
        super(UserForm, self).__init__(*args, **kwargs)

        emails = get_all_user_mails(self.instance)

        self.fields['email'].choices = [(x, x) for x in sorted(emails)]
        self.fields['username'].valid = self.instance.username

        self.helper = FormHelper(self)
        self.helper.disable_csrf = True
        self.helper.form_tag = False