Exemplo n.º 1
0
def rank(request):
    logged_in = request.user.is_authenticated()
    if logged_in:
        voted = request.user.vote_set.exists()
        follows = api.followed(request.user)
    deputys = api.rank(request.user)
    clubs = api.rank_clubs(request.user)
    return render(request, "people/rank.html", locals())
Exemplo n.º 2
0
def user(request, username):
    user = get_object_or_404(User, username=username)
    follows = api.followed(user)
    followers = api.followers(user)
    return render(request, "people/user.html", locals())