I'm building a Django site where a user can register and do some stuff. After registering, the email should be confirmed.
Here is how a user is confirmed: in my database, i added a table called account_emailaddress
. The verified
column, in this table, will give 0
when the email address is not confirmed and 1
when it is confirmed.
Now, i have a template, this template should throw an error when the email address is equal to 0
.
Is this doable at all? I don't know where to put my feet to do this, so can someone guide to me an approach to do this? I'm not using a custom user model edited by me, but the Django user model.
Here is what the template looks like:
I'm assuming i need to sort this in my template's file, by adding an if statement like the one below:
{% block content %}
{% if email_is_confirmed %}
<style>
</style>
<body>
<p> CONFIRMED </p>
<div> <p>Here goes a bunch of features</p> </div>
</body>
{% else %}
<p> Your email is not confirmed </p>
{% endif %}
{% endblock %}