chore(dgsi/profile): Simplify view

This commit is contained in:
Tom Hubrecht 2025-02-01 18:20:56 +01:00
parent 7e7d8e74ff
commit 3d320806af
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
2 changed files with 1 additions and 9 deletions

View file

@ -23,7 +23,7 @@
{% block content %}
<h2 class="subtitle">
<span>{% blocktrans %}Profil de {{ displayname }}{% endblocktrans %}</span>
<span>{% blocktrans with first_name=user.first_name last_name=user.last_name %}Profil de {{ first_name }}&nbsp;{{ last_name }}{% endblocktrans %}</span>
</h2>
<hr>

View file

@ -73,14 +73,6 @@ class IndexView(TemplateView):
class ProfileView(LoginRequiredMixin, TemplateView):
template_name = "dgsi/profile.html"
def get_context_data(self, **kwargs):
u = User.from_request(self.request)
return super().get_context_data(
displayname=f"{u.first_name} {u.last_name}",
**kwargs,
)
class GenerateWiFiPasswordView(LoginRequiredMixin, RedirectView):
url = reverse_lazy("dgsi:dgn-profile")