On remplace les Querysets par ce qu'on veut
This commit is contained in:
parent
3da477729a
commit
d5c1e2225a
2 changed files with 7 additions and 4 deletions
|
@ -6,9 +6,9 @@
|
|||
<h2>Liste des groupes administrés</h2>
|
||||
<hr>
|
||||
|
||||
{% if wikigroups %}
|
||||
{% if wikigroup_list %}
|
||||
<div class="list-group">
|
||||
{% for group in wikigroups %}
|
||||
{% for group in wikigroup_list %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'wiki_groups:admin-group' group.pk %}">{{ group }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -67,10 +67,13 @@ class ManagedGroupsView(LoginRequiredMixin, ListView):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx["wikigroups"] = set()
|
||||
wikigroups = set()
|
||||
|
||||
for group in ctx["wikigroup_list"]:
|
||||
ctx["wikigroups"] |= group.get_all_groups()
|
||||
wikigroups |= group.get_all_groups()
|
||||
|
||||
ctx["wikigroup_list"] = wikigroups
|
||||
ctx["object_list"] = wikigroups
|
||||
|
||||
return ctx
|
||||
|
||||
|
|
Loading…
Reference in a new issue