Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adrián Ribao
Cartero
Commits
f7c4a399
Commit
f7c4a399
authored
Feb 15, 2013
by
Adrián Ribao
Browse files
fix more python 2.6 related bugs
parent
6d517b90
Changes
1
Hide whitespace changes
Inline
Side-by-side
cartero/utils/sending.py
View file @
f7c4a399
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment