Open SHxKM opened 4 years ago
There's actually just one template in this app: _create_referral_form.html
, which has a button to create the referral link. If you are talking about template.Node
(https://github.com/pinax/pinax-referrals/blob/23489898f0785b788dc68a32cff3213bf6a4d732/pinax/referrals/templatetags/pinax_referrals_tags.py#L22), that refers to the custom template tag creation process and nodes that are created when Django splits the html template (https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/#a-quick-overview). Some of the Pinax apps have no templates at all, because they are simply backend. You can customize pinax-referrals however you want, including incorporating with DRF. Not sure about recording payment actions, but looks like classmethod Referral.record_response
might be the starting point... ? https://github.com/pinax/pinax-referrals/blob/71b4d2fcadb9137537984359c1aca145a3c780e0/README.md#referralrecord_response
@SHxKM Don't know if this is of interest to you, but @rosscdh has opened a PR in pinax-comments with the intention of starting a discussion about implementing DRF. Adding DRF into Pinax is probably more opinionated than what the original authors intended (Pinax also includes pinax-api btw, which alas hasn't been updated in a while), but I'd be interested to know what @paltman and @jtauber think. You can always fork the repo and add DRF yourself too. https://github.com/pinax/pinax-comments/pull/30
Yes for djangorestframework==3.12.4 its is most compatible , not sure about payment . It is possible to integrate payment link from payment provider using Referral.record_response
I see a lot of references to Django HTML templates. Is this library suitable for apps that use Django only as a backend (API with Django REST Framework)? Is it possible to only record referral action on (for example) payment rather than visits/registrations?