Search code examples
pythondjangopaypaldjango-paypal

Django-PayPal IPN urls include not working


I was following the instructions here to use PayPal standard IPN. I got stuck at step 4 where I have to include the 'paypal.standard.ipn.urls'. When I visit my localhost it shows
NameError at /
name 'include' is not defined.
The error might not be django specific but I really need help. I know there are some similar questions but none of them seems to have a problem on this particular step. Thank you!

urls.py

urlpatterns = patterns('',
    (r'^notify/', include('paypal.standard.ipn.urls')),
)

Solution

  • You need to import include:

    from django.conf.urls import include