【发布时间】:2012-10-02 03:18:28
【问题描述】:
我使用 django 框架中的 mailsnake 从我的网站动态创建活动。想要将数据和图像直接添加到活动中,我将 html 数据添加到 postcard_heading00、postcard_image、std_content00 等部分。 编写如下代码:
mailsnake = MailSnake('apikey')
template_option = {'list_id':xxxx, 'subject':'testing', 'from_email':'xxxxx', 'from_name':'Test', 'to_name':'', 'template_id':54457, 'inline_css':True, 'generate_text': True, 'title':'testing' }
template_content = {"html_postcard_heading00":"<h1>Testing</h1>","html_std_content00":"<h1>Testing</h1>","html_postcard_image":"<img src='image_path'>"}
并将此内容传递给
campaignCreate(type='regular',options = template_option,content=template_content)
方法。 广告系列已正确创建,但内容仍未添加到广告系列中。
谁能告诉我为什么会这样?
【问题讨论】:
-
数据将被添加到“std_preheader_content”、“std_preheader_links”、“std_social”和“std_footer”等部分。任何内容都将添加到上述部分中正确添加的图像或文本。问题与“postcard_heading00”、“std_content00”和“postcard_image”部分。可重复部分有什么问题吗?