From bafa9ac10c8e74dbb07a4dbfec12c444efbadaed Mon Sep 17 00:00:00 2001 From: klmp200 Date: Tue, 25 Oct 2016 18:25:59 +0200 Subject: [PATCH] Small fix for auto-mail about eticket --- counter/models.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/counter/models.py b/counter/models.py index b27f7f32..c1f11c62 100644 --- a/counter/models.py +++ b/counter/models.py @@ -59,9 +59,7 @@ class Customer(models.Model): return reverse('core:user_account', kwargs={'user_id': self.user.pk}) def get_full_url(self): - request = None - full_url = ''.join(['http://', settings.SITH_URL, self.get_absolute_url()]) - return full_url + return ''.join(['https://', settings.SITH_URL, self.get_absolute_url()]) class ProductType(models.Model): @@ -303,11 +301,12 @@ class Selling(models.Model): super(Selling, self).delete(*args, **kwargs) def send_mail_customer(self): - subject = _('Eticket bought for the event %(event)s') % {'event': self.product.name} + event = self.product.eticket.event_title + subject = _('Eticket bought for the event %(event)s') % {'event': event} message_html = _( "You bought an eticket for the event %(event)s.\nYou can download it on this page %(url)s." ) % { - 'event': self.product.name, + 'event': event, 'url':''.join(( '