Remove example personalisation from template page

This was of dubious value, and the syntax probably isn’t accurate for
all languages.
This commit is contained in:
Chris Hill-Scott
2016-08-10 10:09:04 +01:00
parent 44a0845882
commit 7010e35256
3 changed files with 2 additions and 11 deletions

View File

@@ -193,13 +193,9 @@ def send_from_api(service_id, template_id):
service_api_client.get_service_template(service_id, template_id)['data'],
prefix=current_service['name']
)
personalisation = {
placeholder: "..." for placeholder in template.placeholders
}
return render_template(
'views/send-from-api.html',
template=template,
personalisation=json.dumps(personalisation, indent=4) if personalisation else None
template=template
)

View File

@@ -32,9 +32,4 @@
{{ api_key(template.id, name="Template ID", thing='template ID') }}
</div>
{% if personalisation %}
<h2 class="heading-small">Personalisation (all fields are required)</h2>
{{ personalisation|syntax_highlight_json }}
{% endif %}
{% endblock %}

View File

@@ -251,7 +251,7 @@ def test_api_info_page(
follow_redirects=True
)
assert response.status_code == 200
assert 'API integration' in response.get_data(as_text=True)
assert 'API info' in response.get_data(as_text=True)
def test_download_example_csv(