2016-11-06 124 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

相關問題