Keep invite settings in form after save

This commit is contained in:
Mouse Reeve 2021-02-23 15:25:26 -08:00
parent 384187a263
commit 23fb5f62a2

View file

@ -46,7 +46,15 @@ class ManageInvites(View):
invite.user = request.user
invite.save()
return redirect('/settings/invites')
paginated = Paginator(models.SiteInvite.objects.filter(
user=request.user
).order_by('-created_date'), PAGE_LENGTH)
data = {
'title': 'Invitations',
'invites': paginated.page(1),
'form': form
}
return TemplateResponse(request, 'settings/manage_invites.html', data)
class Invite(View):