group creation form can now be submitted!

Whoops
This commit is contained in:
Hugh Rundle 2021-09-24 15:04:52 +10:00
parent 4e93b09067
commit f32a2cc4d0
3 changed files with 8 additions and 7 deletions

View file

@ -6,7 +6,7 @@
{% endblock %}
{% block form %}
<form name="create-list" method="post" action="{% url 'lists' %}">
<form name="create-group" method="post" action="{% url 'groups' %}">
{% include 'group/form.html' %}
</form>
{% endblock %}

View file

@ -14,12 +14,12 @@
</div>
</div>
</div>
<!-- <div class="columns is-mobile">
<div class="columns is-mobile">
<div class="column">
<div class="field has-addons">
<div class="control">
<!-- <div class="control">
{% include 'snippets/privacy_select.html' with current=group.privacy %}
</div>
</div> -->
<div class="control">
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
</div>
@ -31,4 +31,4 @@
{% include 'snippets/toggle/toggle_button.html' with class="is-danger" text=button_text icon_with_text="x" controls_text="delete_group" controls_uid=group.id focus="modal_title_delete_group" %}
</div>
{% endif %}
</div> -->
</div>

View file

@ -59,8 +59,9 @@ class UserGroups(View):
def get(self, request, username):
"""display a group"""
user = get_user_from_username(request.user, username)
groups = models.GroupMember.objects.filter(user=user)
groups = privacy_filter(request.user, groups)
# groups = models.GroupMember.objects.filter(user=user)
groups = models.Group.objects.filter(members=request.user)
# groups = privacy_filter(request.user, groups)
paginated = Paginator(groups, 12)
data = {