I wanna check user's e-mail verify status for displaying a warning message. If e-mail address is not verified, i will show a message top of the page.
Is there any template tag for checking user's e-mail address is confirmed?
I wanna check user's e-mail verify status for displaying a warning message. If e-mail address is not verified, i will show a message top of the page.
Is there any template tag for checking user's e-mail address is confirmed?
You can use custom template tags, to verify the same as shown below:
app_tags.py
from django import template
register = template.Library()
@register.assignment_tag
def verify_email(email):
...
if email_verified:
return True
else
return False
example.html
{% load app_tags %}
...
{% verify_email email as email_verified %}
{% if email_verified %}
do something
{% endif %}