django-paypal 教程:'reverse' 似乎使用不正确

django-paypal tutorial: 'reverse' seems to be used incorrectly

我正在尝试使用 django-paypal(也许有更好的库?)并且我正在从这里的页面学习:https://django-paypal.readthedocs.org/en/stable/standard/ipn.html

在此块中使用了 reverse,但在项目中使用时会抛出错误(即使您导入它)

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/",

}

我是这样导入的:

from django.core.urlresolvers import reverse

我得到这个错误:

NoReverseMatch at /pay/

Reverse for 'paypal-ipn' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

要么是我遗漏了什么,要么是教程不完整(或有误?);我只需要在这里进行一些更正。

问题是我没有在我的网址中添加这个:

url(r'^something/paypal/', include('paypal.standard.ipn.urls')),