Beispiel #1
0
def get_eod(request, symbol, start_date=None, end_date=None):

    if not request.user.is_authenticated():
        msg = {error: 'Not authenticated'}
        return HttpResponse(json.dumps(msg), content_type="application/json")

    db = DB(settings.YAHOO_DATABASE)
    rows = db.get_eod(symbol, start_date, end_date)
    return HttpResponse(json.dumps(rows), content_type="application/json")
Beispiel #2
0
def load_db():
    db = DB(config['mysql'])

    return db.db