1 from django.db import models
2 from django.contrib.auth.models import User
5 class OAuthConnection(models.Model):
6 user = models.ForeignKey(User)
7 access = models.BooleanField(default=False)
8 token = models.CharField(max_length=64, null=True, blank=True)
9 token_secret = models.CharField(max_length=64, null=True, blank=True)
14 return cls.objects.get(user=user)
15 except cls.DoesNotExist: