1 # -*- coding: utf-8 -*-
2 from django.db import models
3 from django.contrib.auth.models import User
6 class OAuthConnection(models.Model):
7 user = models.OneToOneField(User)
8 access = models.BooleanField(default=False)
9 token = models.CharField(max_length=64, null=True, blank=True)
10 token_secret = models.CharField(max_length=64, null=True, blank=True)
15 return cls.objects.get(user=user)
16 except cls.DoesNotExist: