Fix logged-out user page

This commit is contained in:
cuom1999 2024-04-12 00:04:07 -05:00
parent 361d3fc33a
commit 2f64c87d56

View file

@ -79,6 +79,7 @@
{% endblock %} {% endblock %}
{% block js_media %} {% block js_media %}
{% if request.user.is_authenticated %}
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$("#message-button").on("click", function() { $("#message-button").on("click", function() {
@ -92,6 +93,7 @@
}); });
}); });
</script> </script>
{% endif %}
{% block user_js_media %}{% endblock %} {% block user_js_media %}{% endblock %}
{% endblock %} {% endblock %}
@ -102,7 +104,7 @@
<img src="{{ gravatar(user, 145) }}" width="145px" height="145px"> <img src="{{ gravatar(user, 145) }}" width="145px" height="145px">
</div> </div>
<br> <br>
{% if request.user != user.user %} {% if request.user.is_authenticated and request.profile != user %}
<form method="post" action="{{ url('user_toggle_follow', user.username) }}"> <form method="post" action="{{ url('user_toggle_follow', user.username) }}">
{% csrf_token %} {% csrf_token %}
<button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px"> <button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px">