chore(dgsi/profile): Simplify view
This commit is contained in:
parent
7e7d8e74ff
commit
3d320806af
2 changed files with 1 additions and 9 deletions
|
@ -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 }} {{ last_name }}{% endblocktrans %}</span>
|
||||
</h2>
|
||||
<hr>
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue