mercredi 22 juillet 2020

Django - How to make a notification?f when User Register It will send notification to Email of Admin

class SignupForm(forms.Form):
    username = forms.CharField(max_length=10, widget=forms.TextInput({
                'class': 'form-control',
                'placeholder': 'Username',
                })
            )
    email = forms.EmailField(
            max_length=200,
            widget=forms.TextInput({
                'class': 'form-control',
                'placeholder': 'Email'
                })
            )
    password = forms.CharField(
            min_length=6, max_length=10,
            widget=forms.PasswordInput({
                'class': 'form-control',
                'placeholder': 'Password'
                })
            )

    repeat_password = forms.CharField(
            min_length=6, max_length=10,
            widget=forms.PasswordInput({
                'class': 'form-control',
                'placeholder': 'Repeat password'
                })
            )

Here is my form.py, how to make an email notification to the email of server ? That will notify the admin that there is a new User register to his application.




Aucun commentaire:

Enregistrer un commentaire