2016-11-06 127 views
1

在django oscar商店中整合paypal express的问题。no such table:paypal_expresstransaction

加入“贝宝”来安装的应用程序,并写模板用下面的代码:

{% extends 'oscar/checkout/payment_details.html' %} 
{% load i18n %} 

{% block payment_details %} 
    <div class="well"> 
     <div class="sub-header"> 
     <h3>{% trans "PayPal Express" %}</h3> 
    </div> 
    <p>{% trans "Click on the below icon to use Express Checkout but where the shipping address and method is already chosen on the merchant site." %}</p> 
    <div style="overflow:auto"><a href="{% url 'paypal-direct-payment' %}" title="{% trans "Pay with PayPal" %}"><img src="https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif" align="left" style="margin-right:7px;"></a>&nbsp;</div> 
</div> 
{% endblock %} 

在点击付款按钮,我得到这个错误: 没有这样的表:paypal_expresstransaction

+0

您是否迁移? – Selcuk

+0

我做过了,回来了“没有迁移申请”。 –

+0

但是,自从您添加了新模型的新应用程序之后,应该有所作为。确保你先运行'makemigrations'。 – Selcuk

回答

4

试运行迁移与指定的应用程序

./manage.py makemigrations paypal 

然后只是迁移。

+1

'makemigrations'和'makemigrations app_name'有什么区别?前者没有采取任何改变,但是当我使用后者时,有两个变化,OP已经消失了同样的问题。 – MadPhysicist

相关问题