Name shown twice in user_details.html if username set to email (#4436)

* Update user_detail.html

* Wrap long conditions over multiple lines

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
This commit is contained in:
Andrew Chen Wang 2023-07-10 12:46:42 -04:00 committed by GitHub
parent cb4d41dc96
commit a82622b592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,17 @@
{% else %} {% else %}
{% raw %}{{ object.username }}{% endraw %} {% raw %}{{ object.username }}{% endraw %}
{% endif %} {% endif %}
{% raw %}
</h2> </h2>
{% if object.name %}<p>{{ object.name }}</p>{% endif %} {%- if cookiecutter.username_type == "username" %}
{%- raw %}
{% if object.name %}
<p>{{ object.name }}</p>
{% endif %}
{%- endraw %}
{%- endif %}
</div> </div>
</div> </div>
{%- raw %}
{% if object == request.user %} {% if object == request.user %}
<!-- Action buttons --> <!-- Action buttons -->
<div class="row"> <div class="row">