From 212c260c8f91e0f85adc53fa687e0101d07fe150 Mon Sep 17 00:00:00 2001 From: Joshua McKenty Date: Sun, 30 Jun 2013 16:38:04 -0700 Subject: [PATCH] Adding cloud model --- refstack/runserver.py | 3 + refstack/web.py | 21 ++++++ static/toast.css | 152 ------------------------------------------ 3 files changed, 24 insertions(+), 152 deletions(-) create mode 100644 refstack/runserver.py delete mode 100644 static/toast.css diff --git a/refstack/runserver.py b/refstack/runserver.py new file mode 100644 index 00000000..38d23f0c --- /dev/null +++ b/refstack/runserver.py @@ -0,0 +1,3 @@ +from web import app + +app.run() \ No newline at end of file diff --git a/refstack/web.py b/refstack/web.py index dd891d3e..18dddd0c 100644 --- a/refstack/web.py +++ b/refstack/web.py @@ -29,6 +29,27 @@ class Vendor(db.Model): def __repr__(self): return '' % self.vendor_name +class Cloud(db.Model): + id = db.Column(db.Integer, primary_key=True) + vendor_id = db.Column(db.Integer, db.ForeignKey('vendor.id')) + vendor = db.relationship('Vendor', + backref=db.backref('clouds', lazy='dynamic')) + + endpoint = db.Column(db.String(120), unique=True) + test_user = db.Column(db.String(80), unique=True) + test_key = db.Column(db.String(80), unique=True) + admin_endpoint = db.Column(db.String(120), unique=True) + admin_user = db.Column(db.String(80), unique=True) + admin_key = db.Column(db.String(80), unique=True) + + def __init__(self, endpoint, test_user, test_key): + self.endpoint = endpoint + self.test_user = test_user + self.test_key = test_key + + def __repr__(self): + return '' % self.endpoint + @app.route('/', methods=['POST','GET']) def index(): diff --git a/static/toast.css b/static/toast.css deleted file mode 100644 index 92aa5788..00000000 --- a/static/toast.css +++ /dev/null @@ -1,152 +0,0 @@ -/*-----------------------------------*\ - - Toast - A Simple CSS Framework - ================================= - - Values you may want to change: - - .container { max-width:; } - - p { margin-bottom:; } - - html { font:; } - - Remember: no framework will be as - good as a custom built, per- - project one. Toast and other - frameworks are best used for - rapid prototyping. - -\*-----------------------------------*/ - -/*-----------------------------------*\ - $RESET -\*-----------------------------------*/ - -* { - margin: 0; - padding: 0; - position: relative; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -/*-----------------------------------*\ - $GRID -\*-----------------------------------*/ - -.container { - /* Whatever you want. They’re your oats. */ - max-width: 960px; - margin: 0 auto; - padding: 0 30px; - padding: 0 1.5rem; -} - -.grid { - margin-left: -3%; - max-width: 105%; -} - -.unit { - display: inline-block; - *display: inline; - *zoom: 1; - vertical-align: top; - margin-left: 3%; - margin-right: -.25em; - /* Clearfix */ - overflow: hidden; - *overflow: visible; -} - - .unit.demo { - background-color: #fff8eb; - height: 48px; - height: 3rem; - margin-bottom: 24px; - margin-bottom: 1.5rem; - } - -.span-grid { - width: 97%; -} - -.one-of-two { width: 47%; } - -.one-of-three { width: 30.36%; } -.two-of-three { width: 63.666666666%; } - -.one-of-four { width: 22.05%; } -.three-of-four { width: 72%; } - -.one-of-five { width: 17.07%; } -.two-of-five { width: 37%; } -.three-of-five { width: 57%; } -.four-of-five { width: 77%; } - -@media screen and (max-width: 650px) { - .grid { - margin-left: 0; - max-width: none; - } - - .unit { - width: auto; - margin-left: 0; - display: block; - } -} - -/*-----------------------------------*\ - $TYPE - - Works off the assumption of a 1.5 - line height @ 20px. Again, change - as necessary. -\*-----------------------------------*/ - -p, .p, ul, ol, hr, table, form, pre, -h1, .alpha, h2, .beta { - margin-bottom: 30px; - margin-bottom: 1.5rem; -} - -h1, .alpha { - font-size: 60px; - font-size: 3rem; - font-weight: 700; - line-height: 1; -} - -h2, .beta { - font-size: 30px; - font-size: 1.5rem; - font-weight: 400; - line-height: 2; -} - -h3, .gamma { - font-size: 20px; - font-size: 1rem; - font-weight: 700; -} - -hr { - border: none; - border-bottom: 1px solid rgba(0,0,0,.1); - margin-top: -1px; -} - -/*-----------------------------------*\ - $MAIN -\*-----------------------------------*/ - -html { - font: 125%/1.5 Helvetica Neue, Helvetica, Arial, sans-serif; -} - -@media screen and (max-width: 650px) { - html { - font-size: 100%; - } -}