Added verified icon for email

This commit is contained in:
ayxan 2022-12-07 22:01:05 +04:00
parent bb994fbe1f
commit 7708b7ccb1
3 changed files with 22 additions and 15 deletions

View File

@ -9,7 +9,13 @@
<div class="card mb-3">
<div class="card-body">
<h5>Username: <small>{{profile.username}}</small></h5>
{% if profile.email_notification_is_active %}
<h5>Email: <small style="margin-right: 0.7%;">{{profile.email|default:""}}</small>
<img src="{% static 'icons/verified.png' %}" alt="{% static 'icons/verified.png' %}" width="22px">
</h5>
{% else %}
<h5>Email: <small>{{profile.email|default:""}}</small></h5>
{% endif %}
<h5>IMDB API Key: <small>{{profile.imdb_api_key}}</small></h5>
</div>
</div>

View File

@ -42,6 +42,7 @@ def profile_editing_view(request):
user.email_notification_is_active = False
user.save()
to_email = form.cleaned_data.get('email')
if to_email is not None:
current_site = get_current_site(request)
mail_subject = 'Activate your account.'
message = render_to_string('acc_active_email.html', {

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB