Pass request.user to view without altering the url
问题 I'm trying to write a view where the current logged in user's information is retrieved. My view is written as below, and it works perfectly fine as long as I pass the user to the view in the URL. def index(request, username, template="index.html"): user = get_object_or_404(User, username__iexact=username) expression_qs = Expression.objects.all().order_by('-created') album_qs = Album.objects.all().filter(head__isnull=False, is_public=True).order_by('-created') user_following = user