Private
Public Access
1
0

small changes

This commit is contained in:
Sander Roosendaal
2020-01-11 17:56:38 +01:00
parent 48a361a43e
commit 892b6c0e60
3 changed files with 27 additions and 28 deletions

View File

@@ -647,17 +647,13 @@ def team_edit_view(request, team_id=0):
})
#@user_passes_test(cancreateteam,login_url="/rowers/paidplans",redirect_field_name=None)
@login_required()
def team_create_view(request):
r = getrequestrower(request)
if r.rowerplan == 'basic':
if r.protrialexpires < timezone.now().date() and r.plantrialexpires < timezone.now().date():
messages.error(request,"You must upgrade to Pro or higher to create teams/training groups")
url = reverse('paidplans')
return HttpResponseRedirect(url)
if not user_is_not_basic(request.user):
messages.error(request,"You must upgrade to Pro or higher to create teams/training groups")
url = reverse('paidplans')
return HttpResponseRedirect(url)
if request.method == 'POST':
teamcreateform = TeamForm(request.POST)