@receiver(post_student_info)<EOL>def applyReferrerVouchersTemporarily(sender,**kwargs):
<EOL>if not getConstant('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>logger.debug('<STR_LIT>')<EOL>reg = kwargs.pop('<STR_LIT>')<EOL>try:<EOL><INDENT>c = Customer.objects.get(user__email=reg.email)<EOL>vouchers = c.getReferralVouchers()<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>vouchers = None<EOL><DEDENT>if not vouchers:<EOL><INDENT>logger.debug('<STR_LIT>')<EOL>return<EOL><DEDENT>for v in vouchers:<EOL><INDENT>TemporaryVoucherUse(voucher=v,registration=reg,amount=<NUM_LIT:0>).save()<EOL><DEDENT>
Unlike voucher codes which have to be manually supplied, referrer discounts are
automatically applied here, assuming that the referral program is enabled.