Private
Public Access
1
0

working, passing, everything

This commit is contained in:
Sander Roosendaal
2019-02-15 21:44:30 +01:00
parent 948fbf76ee
commit 14c7296c9b
3 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ def create_team(name,manager,private='open',notes='',viewing='allmembers'):
if manager.rower.rowerplan == 'basic': if manager.rower.rowerplan == 'basic':
if manager.rower.protrialexpires < timezone.now().date() and manager.rower.plantrialexpires < timezone.now().date(): if manager.rower.protrialexpires < timezone.now().date() and manager.rower.plantrialexpires < timezone.now().date():
return (0,'You need to upgrade to a paid plan to establish a team') return (0,'You need to upgrade to a paid plan to establish a team')
elif manager.rower.rowerplan != 'coach': if manager.rower.rowerplan != 'coach':
ts = Team.objects.filter(manager=manager) ts = Team.objects.filter(manager=manager)
if len(ts)>=1: if len(ts)>=1:
return (0,'You need to upgrade to the Coach plan to have more than one team') return (0,'You need to upgrade to the Coach plan to have more than one team')

Binary file not shown.

View File

@@ -4,7 +4,7 @@ from statements import *
def start_trial_view(request): def start_trial_view(request):
r = getrower(request.user) r = getrower(request.user)
if r.protrialexpires is not None: if r.protrialexpires > datetime.date(1970,1,1):
messages.error(request,'You do not qualify for a trial') messages.error(request,'You do not qualify for a trial')
url = '/rowers/paidplans' url = '/rowers/paidplans'
return HttpResponseRedirect(url) return HttpResponseRedirect(url)
@@ -31,7 +31,7 @@ def start_trial_view(request):
def start_plantrial_view(request): def start_plantrial_view(request):
r = getrower(request.user) r = getrower(request.user)
if r.plantrialexpires is not None: if r.plantrialexpires > datetime.date(1970,1,1):
messages.error(request,'You do not qualify for a trial') messages.error(request,'You do not qualify for a trial')
url = '/rowers/paidplans' url = '/rowers/paidplans'
return HttpResponseRedirect(url) return HttpResponseRedirect(url)