forked from enviPath/enviPy
Implement basic group listing and re-enabled group creation
This commit is contained in:
@ -2846,9 +2846,15 @@ def groups(request):
|
||||
{"Group": s.SERVER_URL + "/group"},
|
||||
]
|
||||
|
||||
context["objects"] = Group.objects.all()
|
||||
# Context for paginated template
|
||||
context["entity_type"] = "group"
|
||||
context["api_endpoint"] = f"{s.SERVER_PATH}/api/v1/groups/"
|
||||
context["per_page"] = s.API_PAGINATION_DEFAULT_PAGE_SIZE
|
||||
context["list_title"] = "groups"
|
||||
context["list_mode"] = "combined"
|
||||
|
||||
return render(request, "collections/groups_paginated.html", context)
|
||||
|
||||
return render(request, "collections/objects_list.html", context)
|
||||
elif request.method == "POST":
|
||||
group_name = request.POST.get("group-name")
|
||||
group_description = request.POST.get("group-description", s.DEFAULT_VALUES["description"])
|
||||
|
||||
Reference in New Issue
Block a user