B
B
BiosSpy2014-12-14 18:10:26
Django
BiosSpy, 2014-12-14 18:10:26

Django How to check email for existence?

Good afternoon.
There is a form successor "ModelForm" with the field "email". How to make it so that when adding to the database there is a check whether there is such an email in the table or not?
As with user login. It is impossible to register several users with one login. Here too most with email'om it is necessary.
Thank you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Scherbakov, 2014-12-14
@BiosSpy

If you have an email field in the model, then it's enough to say
Uniqueness will be guaranteed at the DBMS level. There is no form here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question