【发布时间】:2017-11-25 19:39:18
【问题描述】:
我创建了带有可重复部分的 Mailchimp 模板,如下所示:
<div class="article" mc:repeatable="article">
<h3 mc:edit="headline">Headline</h3>
<p mc:edit="author">Author</p>
</div>
当我使用 Mailchimp API Playground 检查此模板的默认内容 (GET templates/my_template_id/default-content) 时,可重复部分显示为 repeat_1。
所以当我需要使用此模板设置活动内容时,我必须填写参数:
{'template': {'id': 9999, 'sections': {'repeat_1': [{'headline': 'Headline01', 'author': 'author01'}, {'headline': 'Headline02', 'authors': 'author02'}]}}}
这样可以正常工作,但是有什么方法可以使用更好的命名方式吗?我不想将其保留为 repeat_1。
【问题讨论】:
标签: python python-2.7 mailchimp mailchimp-api-v3.0