|
|
|
|
@ -20,6 +20,7 @@ from django.utils.decorators import method_decorator |
|
|
|
|
from django.utils.timezone import now |
|
|
|
|
|
|
|
|
|
from apps.auth.tokens import verification_email_token |
|
|
|
|
from apps.config.models import Config |
|
|
|
|
from apps.course.models import Course |
|
|
|
|
from apps.notification.utils import send_email |
|
|
|
|
from apps.school.models import SchoolSchedule |
|
|
|
|
@ -298,6 +299,7 @@ class BonusHistoryView(TemplateView): |
|
|
|
|
template_name = 'user/bonus-history.html' |
|
|
|
|
|
|
|
|
|
def get(self, request, *args, **kwargs): |
|
|
|
|
config = Config.load() |
|
|
|
|
context = self.get_context_data(**kwargs) |
|
|
|
|
context['bonuses'] = request.user.bonuses.filter( |
|
|
|
|
payment__isnull=False, |
|
|
|
|
@ -306,4 +308,8 @@ class BonusHistoryView(TemplateView): |
|
|
|
|
context['referrer_url'] = '%s%s?referrer=%s' % ( |
|
|
|
|
settings.MAIN_HOST, reverse('index'), short_url.encode_url(request.user.id) |
|
|
|
|
) |
|
|
|
|
context['share_text'] = '%s приглашает вас и ваших детей в первую онлайн школу креативного мышления Lil School. ' \ |
|
|
|
|
'Занимайтесь с ребёнком творчеством, не выходя из дома. ' \ |
|
|
|
|
'Перейдите по ссылке и получите скидку %d%% на первую покупку' \ |
|
|
|
|
% (request.user.get_full_name(), config.REFERRAL_BONUS) |
|
|
|
|
return self.render_to_response(context) |
|
|
|
|
|