I’m writing an application in django that needs to only allow a form to be submitted if the email address is that of a specified domain. For example is:
test@gmail.com
And doesn’t allow:
test@hotmail.com
or any other domain. So how can I do this in django to see if the email address belongs to a specified domain? Should I just split the string from the email address field and do a check on the domain or is there a better approach?
For example: