from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from social_django.models import UserSocialAuth


@login_required
def top_page(request):
    user = UserSocialAuth.objects.get(user=request.user, provider='twitter')
    return render(request, 'app1/mypage.html', {'user': user})
