We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! :)
I am trying to create referral system in my Django project. I found your very interesting app and want to test it for this task.
From documentation its not clear how correctly to use it and there is no example. As I understand we need make next steps:
Profile
from django.contrib.auth.models import User from django.dispatch import receiver from account.signals import user_signed_up # django-user-account app from pinax.referrals.models import Referral class Profile(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) referral = models.OneToOneField(Referral, null=True, on_delete=models.CASCADE) @receiver(user_signed_up) def handle_user_signed_up(sender, user, form, **kwargs): Referral.create(redirect_to=user.profile.get_absolute_url())
from account.views import SignupView from pinax.referrals.models import Referral class RegistrationView(SignupView): def after_signup(self, form): super(RegistrationView, self).after_signup(form) Referral.record_response(self.request, "USER_SIGNUP")
How correct are my steps? Could you give a simple example for the understanding please?
The text was updated successfully, but these errors were encountered:
Closing this issue as an apparent duplicate of #44
Sorry, something went wrong.
No branches or pull requests
Hello! :)
I am trying to create referral system in my Django project. I found your very interesting app and want to test it for this task.
From documentation its not clear how correctly to use it and there is no example. As I understand we need make next steps:
Profile
models with such code:How correct are my steps? Could you give a simple example for the understanding please?
The text was updated successfully, but these errors were encountered: