spookylukey / django-paypal

A pluggable Django application for integrating PayPal Payments Standard or Payments Pro
MIT License
729 stars 208 forks source link

Where to put notify view function? #186

Closed treytaylor687 closed 7 years ago

treytaylor687 commented 7 years ago

In the documentation it states that a function called show_me_the_money(sender, **kwargs) should be added to the project in order to handle the POST request sent by PayPal on completion of payment. However, the documentation fails to describe where that function should be placed. Should it be placed in the views.py file of the current project, or should there be another python file created just for that function?

spookylukey commented 7 years ago

The documentation doesn't mention it because you may put it wherever you like that makes sense for your project. Please see the Django docs in signals - https://docs.djangoproject.com/en/dev/topics/signals/ . There is a section "Where should this code live?"

Hope that helps.