Skip to content

Commit

Permalink
fix Invites & Referrals
Browse files Browse the repository at this point in the history
  • Loading branch information
JisanAR03 committed Feb 22, 2024
1 parent bcb3255 commit ad0fb84
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2104,20 +2104,6 @@ def form_valid(self, form):
msg = EmailMultiAlternatives(subject, text_content, from_email, to)
msg.attach_alternative(html_content, "text/html")
msg.send()
# email.send()
# site = get_current_site(self.request)
# referral_link = f"{site.domain}/referral/?ref={instance.referral_code}"

# mail_status = send_mail(
# subject=f"Invitation to {site.name} from {self.request.user.username}",
# message=f"You have been invited by {self.request.user.username} to join {site.name}. Use this link to sign up: {referral_link}",
# from_email=settings.DEFAULT_FROM_EMAIL,
# recipient_list=[instance.recipient],
# fail_silently=False,
# )

# if mail_status:
# messages.success(self.request, "An email has been sent to your friend. Keep inviting your friends and earn rewards!")

messages.success(self.request, "An email has been sent to your friend. Keep inviting your friends and earn rewards!")
return super().form_valid(form)
Expand Down

0 comments on commit ad0fb84

Please sign in to comment.