Merge branch 'orgs' of ssh://bitbucket.org/yackob03/quay into orgs

Conflicts:
	data/model.py
This commit is contained in:
yackob03 2013-11-01 19:34:58 -04:00
commit 1aaefe6053
7 changed files with 299 additions and 104 deletions

47
data/plans.py Normal file
View file

@ -0,0 +1,47 @@
import json
USER_PLANS = [
{
'title': 'Open Source',
'price': 0,
'privateRepos': 0,
'stripeId': 'free',
'audience': 'Share with the world',
},
{
'title': 'Micro',
'price': 700,
'privateRepos': 5,
'stripeId': 'micro',
'audience': 'For smaller teams',
},
{
'title': 'Basic',
'price': 1200,
'privateRepos': 10,
'stripeId': 'small',
'audience': 'For your basic team',
},
{
'title': 'Medium',
'price': 2200,
'privateRepos': 20,
'stripeId': 'medium',
'audience': 'For medium-sized teams',
},
]
def getPlan(id):
""" Returns the plan with the given ID or None if none. """
for plan in USER_PLANS:
if plan['stripeId'] == id:
return plan
return None
def isPlanActive(stripe_subscription):
""" Returns whether the plan is active. """
# TODO: this.
return True