This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from utils import show_valid, warn, error, note | |
from clint.textui import puts, indent, columns | |
from urlparse import urlparse | |
def import_settings(quiet=True): | |
"""This method takes care of importing settings from the environment, and config.py file. | |
Order of operations: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'/Users/skoczen/.virtualenvs/core/bin', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg', | |
'/Users/skoczen/.virtualenvs/core/lib/python27.zip', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/plat-darwin', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/plat-mac', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/plat-mac/lib-scriptpackages', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/lib-tk', | |
'/Users/skoczen/.virtualenvs/core/lib/python2.7/lib-old', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# Run this file to upgrade your shared database to a dev plan. | |
# Make sure you're using the heroku gem >= 2.30.1 | |
# Usage: python migrate.py | |
# Follow the interactive prompts. | |
import sys | |
import subprocess | |
def remove_shared_database_after_confirmation(app_name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku addons:add zerigo_dns:tier1 | |
----> Adding zerigo_dns:tier1 to good-schools... failed | |
! Zerigo DNS: The current service plan only allows 10 total host records. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property | |
def stripe_customer(self): | |
stripe.api_key = settings.STRIPE_SECRET | |
if not self.stripe_customer_id: | |
if not self.free_trial_ends_date: | |
if datetime.datetime.now() > self.signup_date + datetime.timedelta(days=30): | |
# They signed up pre-stripe | |
self.free_trial_ends_date = datetime.datetime.now() + datetime.timedelta(minutes=1) | |
else: | |
self.free_trial_ends_date = self.signup_date + datetime.timedelta(days=30) |