How can I list things in a template in an elevator?
Say, for example, that I have a [User] List , and I want to display it in a table. In Django, I would use the "users" context variable and scroll it in the template as follows:
//controller
user = User.objects.all()
context = {'users' : users}
return render_to_template('results.html', context}
//view
<table>
{% for user in users %}
<tr><td>{{user.name}}</td>
<td>{{user.email}}</td>
</tr>
{% endfor %}
</table>
I appreciate any help.
PS: Could you also show me an example of the scala side, since I don’t know how to approach this problem.
source
share