Exemplo n.º 1
0
#!/usr/bin/python

import sys

if 'production' in sys.argv:
    import wsgi_entry
else:
    import cherryapp
    cherryapp.setup()

import models as m;
from datetime import datetime, timedelta
import os
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.s3.bucket import Bucket

conn = None

TIME_DELTA = 1

def get_bucket(conn):
    bucket = Bucket(connection=conn,
             name='ranshousweddingphotos')
    return bucket

def connect_s3():
    global conn
    if not conn:
        with open('./s3_creds.txt') as fh:
            lines = fh.readlines()
Exemplo n.º 2
0
import cherryapp

application = cherryapp.setup("./production.ini")