我有 django-paypal views.py:
from paypal.standard.forms import PayPalPaymentsForm
def view_that_asks_for_money(request):
paypal_dict = {
"business": settings.PAYPAL_RECEIVER_EMAIL,
"amount": "10000000.00",
"item_name": "name of the item",
"invoice": "unique-invoice-id",
"notify_url": "https://www.example.com" + reverse('paypal-ipn'),
"return_url": "https://www.example.com/your-return-location/",
"cancel_return": "https://www.example.com/your-cancel-location/",
}
# Create the instance.
form = PayPalPaymentsForm(initial=paypal_dict)
context = {"form": form}
return render_to_response("payment.html", context)
我必须如何将它包含在我的基本应用程序示例中,以便所有功能都可以正常工作并呈现 payment.html