fix group references in templates

Let's do this the sensible way huh, by using backwards references to memberships etc

Also adds filters for is_member and is_invited so we don't have to do weird things in group Views
This commit is contained in:
Hugh Rundle
2021-10-02 10:47:42 +10:00
parent 2f42161dda
commit 0f3be40957
8 changed files with 35 additions and 21 deletions

View File

@ -24,7 +24,7 @@
{% block panel %}
<section class="block">
<form name="create-group" method="post" action="{% url 'user-groups' 'empty_arg' %}" class="box is-hidden" id="create_group">
<form name="create-group" method="post" action="{% url 'user-groups' request.user.name %}" class="box is-hidden" id="create_group">
<header class="columns">
<h3 class="title column">{% trans "Create group" %}</h3>
<div class="column is-narrow">

View File

@ -22,9 +22,6 @@
{% block panel %}
{% if user.bookwyrm_user %}
{% for group in user.bookwyrm_groups.all %}
<div>{{ group.name }}</div>
{% endfor %}
<div class="block">
<h2 class="title">
{% include 'user/shelf/books_header.html' %}