Private
Public Access
1
0

more fixes

This commit is contained in:
Sander Roosendaal
2020-01-15 15:55:41 +01:00
parent 88703bb34e
commit 8683d8eaa4
10 changed files with 29 additions and 44 deletions

View File

@@ -648,15 +648,10 @@ def team_edit_view(request, team_id=0):
'team':t,
})
#@user_passes_test(cancreateteam,login_url="/rowers/paidplans",redirect_field_name=None)
@user_passes_test(can_add_team,login_url="/rowers/paidplans",redirect_field_name=None)
def team_create_view(request):
r = getrequestrower(request)
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)
if teamcreateform.is_valid():