{{ request.user.get_full_name|default:"" }} (@{{ request.user.username }})
E-Mail: {{ request.user.email }}
The menu item for this page is being shown to everyone, who is authenticated:
Menu.add_item("user", MenuItem(profile_title,
reverse('accounts:profile'),
icon='person-circle',
check=lambda r: r.user.is_authenticated))
Also take a look at the profile_title
. It's not a string,
but a callable, which accepts the request object. In our case,
it renders the user's name on the button:
def profile_title(request):
name = request.user.get_full_name() or request.user
return f"{name}'s Profile"