fix: 🤦 fix profile view bug
This commit is contained in:
parent
6c9a647141
commit
7d00dfe7be
2 changed files with 6 additions and 6 deletions
|
|
@ -3,22 +3,22 @@
|
|||
{% block content %}
|
||||
<div class="grid-content">
|
||||
<aside class="profile">
|
||||
<h2>@{{ user.username }}</h2>
|
||||
<h2>@{{ profile.username }}</h2>
|
||||
<dl>
|
||||
<div>
|
||||
<dt>{% trans %}pronouns{% endtrans %}</dt>
|
||||
<dd>{{ user.pronouns or "not set" }}</dd>
|
||||
<dd>{{ profile.pronouns or "not set" }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{% trans %}location{% endtrans %}</dt>
|
||||
<dd>{{ user.location or "not set" }}</dd>
|
||||
<dd>{{ profile.location or "not set" }}</dd>
|
||||
</div>
|
||||
<div class="double">
|
||||
<dt>{% trans %}about me{% endtrans %}</dt>
|
||||
<dd>{{ user.bio or "not set" }}</dd>
|
||||
<dd>{{ profile.bio or "not set" }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
{% if user.id == request.user.id %}
|
||||
{% if profile.id == request.user.id %}
|
||||
<p class="mt"><a href="{{ url('profile.edit') }}">{% trans %}edit{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
</aside>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ProfileView(TemplateView):
|
|||
user = User.objects.get(username=self.kwargs.get("username"))
|
||||
return {
|
||||
**super().get_context_data(**kwargs),
|
||||
"user": user,
|
||||
"profile": user,
|
||||
"posts": user.posts.order_by("-created_at").all(),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue