15👍
✅
you could ensure that your views have a user by using
@login_required
decorator
then you could could query for points by user in your view
user_points = Points.objects.filter(user=request.user)
or using the reverse FK lookup
request.user.points_set.all()
Source:stackexchange.com