added link based signup

This commit is contained in:
vabene1111
2020-09-01 21:35:37 +02:00
parent 392ee73719
commit 7f68bbd25d
10 changed files with 102 additions and 7 deletions

View File

@ -1,3 +1,5 @@
from datetime import datetime
from django.contrib.auth.decorators import login_required
from django.db.models.functions import Lower
from django.shortcuts import render
@ -63,7 +65,7 @@ def storage(request):
@group_required('admin')
def invite_link(request):
table = InviteLinkTable(InviteLink.objects.all())
table = InviteLinkTable(InviteLink.objects.filter(valid_until__gte=datetime.today(), used_by=None).all())
RequestConfig(request, paginate={'per_page': 25}).configure(table)
return render(request, 'generic/list_template.html', {'title': _("Invite Links"), 'table': table, 'create_url': 'new_invite_link'})