Ejemplo n.º 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
Ejemplo n.º 2
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
Ejemplo n.º 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
Ejemplo n.º 4
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

        self.helper = FormHelper(self)
        self.helper.disable_csrf = True
        self.helper.form_tag = False
Ejemplo n.º 5
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

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