django シンプルな twitter アプリケーションでフォローしている人を知りたいです。そのためのカスタムタグを作成する方法。フォローするユーザーを提案するカスタムタグがあります。
@register.simple_tag
def people_you_may_know(user_id):
return UserProfile.objects.exclude(
followers__follower__user_id=user_id
).exclude(user_id=user_id)
前もって感謝します。