{% extends "base.html" %} {% load ingroup %} {% block extrahead %} <script type="text/javascript" src="{{ MEDIA_URL }}js/manage-groups.js"></script> {% endblock %} {% block title %}Role użytkowników{% endblock %} {% block content %} <h3>Role użytkowników</h3> <table id="user-groups"> <tr> <th>nazwa</th> {% for group in groups %} <th>{{ group.name }}</th> {% endfor %} </tr> {% for u in users %} <tr> <td>{{ u.username }}</td> {% for group in groups %} <td> <input type="checkbox" id="group-{{ group.pk }}-{{ u.pk }}" {% if u|ingroup:group %}checked="checked"{% endif %}/> </td> {% endfor %} </tr> {% endfor %} </table> {% endblock %}