team: Move contributors_list into page_params.

This sidesteps tricky escaping issues, and will make it easier to
build a strict Content-Security-Policy.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-09-12 16:38:24 -07:00 committed by Tim Abbott
parent 7494f1600c
commit fe7d814e8d
3 changed files with 7 additions and 8 deletions

View File

@ -1,6 +1,4 @@
// Contributor list is baked into the /team's page template, so we can silent
// eslint's error.
/* global contributors_list */
const contributors_list = page_params.contrib;
// `repos` are repositories to be shown as tabs, whereas `hidden_repos` are
// repositories that should count towards the total but not have tabs.

View File

@ -5,10 +5,6 @@
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
var contributors_list = {{ contrib|safe }};
</script>
{{ bundle('landing-page') }}
{% endblock %}

View File

@ -537,5 +537,10 @@ def team_view(request: HttpRequest) -> HttpResponse:
return render(
request,
'zerver/team.html',
context=data,
context={
'page_params': {
'contrib': data['contrib'],
},
'date': data['date'],
},
)