将条带与配置文件应用程序一起使用时出现操作错误

Operational error while using stripe with profile app

我正在尝试将 Stripe 嵌入到自定义配置文件应用程序中,并使用 django-registration 包来注册用户。我需要让用户注册,然后为新用户生成一个 Stripe ID,但出现以下错误:

OperationalError at /accounts/login/
no such table: profiles_userstripe

我的个人资料应用模型的完整代码如下:

from django.db import models
from django.contrib.auth.models import User
from django.contrib.auth.signals import user_logged_in

from dailydeals.stripe_info import secret_key, publish_key
import stripe
stripe.api_key = secret_key


class UserStripe(models.Model):
    user = models.OneToOneField(User)
    stripe_id = models.CharField(max_length=120, null=True, blank=True)
    phone_number = models.CharField(max_length=120, default='000-000-0000')

    def __unicode__(self):
        return self.user.username


def CreateStripeID(sender, user, request, **kwargs):

    new_id, created = UserStripe.objects.get_or_create(user=user)
    if created:
    # add users email to stripe and then set stripe id to model
        stripe_cust = stripe.Customer.create(email=user.email, description = 'Customer %s was created' \   
       %(user.username))
        print stripe_cust.id
        new_id.stripe_id = stripe_cust.id
        new_id.save()
    else:
        print "Stripe has been created %s " %new_id
       #print "user logged in %s, %s, %s" %(sender, user, request)

user_logged_in.connect(CreateStripeID)

请指教

有点奇怪。但是当我跟随“No Such Table error”并测试数据库时,它仍然是空的。所以这次我删除了数据库,但也删除了迁移。问题已解决,一切正常。