0
在導入過程中,我確定標記img
是可編輯的,並將幾個內容部分放入multiline
構造中。導入模板在客戶端的模板集顯示出來,但是當我嘗試對它們進行編輯,我只帶有拉鍊/ HTML上傳選項,而不是實際的編輯器:如何使導入的HTML Campaign Monitor模板可編輯?
從我的代碼庫,我自己的模板對象具有出口代碼:
class EmailBodyTemplate(models.Model):
...
def migrate_email_template(self, cm_client_id, cm_token):
cm_template = Template(cm_token)
# Basically I expose a specially tailored HTML version of my template
# for CM: adding editable to imgs, introducing multiline wrappers and
# adding unsubscribe, view in browser and other special links
html_url = settings.HOME_URL + reverse('email_import_view', args=(self.id,))
template_id = cm_template.create(cm_client_id, self.name, html_url, None)
self.template_id = template_id
self.save()