You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

signals.rst 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. =======
  2. Signals
  3. =======
  4. Oscar implements a number of custom signals that provide useful hook-points for
  5. adding functionality.
  6. product_viewed
  7. --------------
  8. .. data:: oscar.apps.catalogue.signals.product_viewed
  9. :class:
  10. Raised when a product detail page is viewed.
  11. Arguments sent with this signal:
  12. ``product``
  13. The product being viewed
  14. ``user``
  15. The user in question
  16. ``request``
  17. The request instance
  18. ``response``
  19. The response instance
  20. product_search
  21. --------------
  22. .. data:: oscar.apps.catalogue.signals.product_search
  23. :class:
  24. Raised when a search is performed.
  25. Arguments sent with this signal:
  26. ``query``
  27. The search term
  28. ``user``
  29. The user in question
  30. basket_addition
  31. ---------------
  32. .. data:: oscar.apps.basket.signals.basket_addition
  33. :class:
  34. Raised when a product is added to a basket
  35. Arguments sent with this signal:
  36. ``product``
  37. The product being added
  38. ``user``
  39. The user in question
  40. voucher_addition
  41. ----------------
  42. .. data:: oscar.apps.basket.signals.voucher_addition
  43. :class:
  44. Raised when a valid voucher is added to a basket
  45. Arguments sent with this signal:
  46. ``basket``
  47. The basket in question
  48. ``voucher``
  49. The voucher in question
  50. pre_payment
  51. -----------
  52. .. data:: oscar.apps.checkout.signals.pre_payment
  53. :class:
  54. Raised immediately before attempting to take payment in the checkout.
  55. Arguments sent with this signal:
  56. ``view``
  57. The view class instance
  58. post_payment
  59. ------------
  60. .. data:: oscar.apps.checkout.signals.post_payment
  61. :class:
  62. Raised immediately after payment has been taken.
  63. Arguments sent with this signal:
  64. ``view``
  65. The view class instance
  66. order_placed
  67. ------------
  68. .. data:: oscar.apps.order.signals.order_placed
  69. :class:
  70. Raised by the :class:`oscar.apps.order.utils.OrderCreator` class when creating an order.
  71. Arguments sent with this signal:
  72. ``order``
  73. The order created
  74. ``user``
  75. The user creating the order (not necessarily the user linked to the order
  76. instance!)