我在我的视图中添加了这段代码:
from paypal.standard.ipn.signals import payment_was_successful
def updateuser(sender, **kwargs):
userid = request.session['userid']
acc = accounts.objects.get(twitterid=userid)
acc.credit=200
acc.save()
payment_was_successful.connect(updateuser)
我添加 models.py 和 views.py 不起作用,我能做什么?