Commit f7c4a399 authored by Adrián Ribao's avatar Adrián Ribao
Browse files

fix more python 2.6 related bugs

parent 6d517b90
......@@ -60,7 +60,7 @@ class CampaignDeliver(object):
if href and href.startswith('http'):
short_url, created = ShortURL.objects.get_or_create(url=href)
url = reverse('click_monitor', args=[short_url.code, self.campaign.id])
fqdn_url = 'http://{}{}'.format(self.site.domain, url)
fqdn_url = 'http://{0}{1}'.format(self.site.domain, url)
link.attrib['href'] = fqdn_url
return tree
......@@ -70,7 +70,7 @@ class CampaignDeliver(object):
mail_track = MailTracks(campaign=self.campaign, contact=contact)
mail_track.save()
url = reverse('track', args=[mail_track.id,])
fqdn_image_url = 'http://{}{}'.format(self.site.domain, url)
fqdn_image_url = 'http://{0}{1}'.format(self.site.domain, url)
img.attrib['src'] = fqdn_image_url
return tree
......@@ -97,7 +97,7 @@ class CampaignDeliver(object):
'last_name': contact.last_name,
'email': contact.email,
'site': contact.site,
'unsubscribe_url': 'http://{}{}'.format(contact.site.domain, unsubscribe_url),
'unsubscribe_url': 'http://{0}{1}'.format(contact.site.domain, unsubscribe_url),
}
if contact.data:
data = json.loads(contact.data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment