2012-06-26 08:33:29 -07:00
|
|
|
from django.contrib.auth.models import User
|
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
2012-07-18 21:39:43 -07:00
|
|
|
class UserProfile(models.Model):
|
2012-06-26 08:33:29 -07:00
|
|
|
user = models.ForeignKey(User, unique=True)
|
|
|
|
is_pro = models.BooleanField(default=False)
|
2012-07-18 21:39:43 -07:00
|
|
|
stripe_id = models.CharField(max_length=100, null=True, blank=True)
|
2012-07-08 20:21:36 -07:00
|
|
|
|
2012-06-26 08:33:29 -07:00
|
|
|
User.profile = property(lambda u: UserProfile.objects.get_or_create(user=u)[0])
|