S
S
s_katala2018-06-11 20:43:38
Django
s_katala, 2018-06-11 20:43:38

How to display correctly?

There is a function in the settings to hide the profile
. I do this, everything works fine, but I also do not see it!
How to make sure that if my profile, it did not work!

{% if profile.profile_hidden == 1 %}
    Профиль скрыт
  {% else %}
    {{profile.username}}
  {% endif %}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Malyarov, 2018-06-11
@Konstantin18ko

{% if (profile.profile_hidden == 1) and (user.id == profile.id %}
    Профиль скрыт
  {% else %}
    {{profile.username}}
  {% endif %}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question