From fb8d5bd3426a4b890fe73553133f29aca55a5fd6 Mon Sep 17 00:00:00 2001 From: Gogs Date: Mon, 7 Aug 2017 00:38:15 +0000 Subject: [PATCH 1/3] updated display for signup form --- src/api/templates/subscribe.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/api/templates/subscribe.html b/src/api/templates/subscribe.html index eb8dbcc..96a6b0a 100644 --- a/src/api/templates/subscribe.html +++ b/src/api/templates/subscribe.html @@ -60,6 +60,14 @@ .action:hover { background-color:#4682b4; color:white} tr {font-family:sans-serif; font-size:14px;} td {padding:4px; font-weight:lighter; padding:4px;} + .gradient{ + background-image: -ms-linear-gradient(top, #008080 -120%, #FFFFFF 50%, #005757 120%); + background-image: -moz-linear-gradient(top, #008080 -120%, #FFFFFF 50%, #005757 120%); + background-image: -o-linear-gradient(top, #008080 -120%, #FFFFFF 50%, #005757 120%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(-120, #008080), color-stop(50, #FFFFFF), color-stop(120, #005757)); + background-image: -webkit-linear-gradient(top, #008080 -120%, #FFFFFF 50%, #005757 120%); + background-image: linear-gradient(to bottom, #008080 -120%, #FFFFFF 50%, #005757 120%); + } @media only screen and (min-device-width: 320px){ table {width:99%} .medium-caption {font-size:14px} @@ -86,7 +94,7 @@
-
+
The Phi Technology @@ -103,7 +111,9 @@
- +
+ +
{{app_name.replace('-',' ') }}
@@ -116,6 +126,9 @@ {% for item in plans%}
{{ item.metadata.info|safe }}
+ {% if 'note' in item.metadata %} +
{{item.metadata.note|safe}}
+ {% endif %}
@@ -175,4 +188,4 @@
- \ No newline at end of file + From 9bb60b0cb911b990327b89153c44fae364bebb31 Mon Sep 17 00:00:00 2001 From: Gogs Date: Sun, 13 Aug 2017 17:10:13 +0000 Subject: [PATCH 2/3] bug fix: status of the pla --- src/Domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Domain.py b/src/Domain.py index 1dcabad..973aabe 100644 --- a/src/Domain.py +++ b/src/Domain.py @@ -141,7 +141,7 @@ class User: return [] def plans(self): lsub = self.subscriptions() - plans = [ sub['plan'] for sub in lsub if sub['ended_at'] is None ] + plans = [ dict({"status":sub['status']},**sub['plan']) for sub in lsub if sub['ended_at'] is None ] return plans """ From d78772c92ff95116c4e892213844ba6d15d7bfc9 Mon Sep 17 00:00:00 2001 From: Gogs Date: Thu, 19 Oct 2017 02:38:25 +0000 Subject: [PATCH 3/3] Bug fix --- src/api/index.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/api/index.py b/src/api/index.py index 9af2c9e..70314cf 100644 --- a/src/api/index.py +++ b/src/api/index.py @@ -5,6 +5,7 @@ """ from __future__ import division from flask import Flask, request, session, render_template,Response +from flask_cors import CORS import Domain from couchdbkit import Server, Document import stripe @@ -29,6 +30,7 @@ stripe.api_key = stripe_keys['secret_key'].strip() app = Flask(__name__) +CORS(app) COUCHDB = Server(uri=CONFIG['couchdb']['uri']) ; """ This function will set the user information to the session and update the information @@ -201,12 +203,12 @@ def get_plans(app_name) : # let's determine if this user can make a purchase # - else: - # # - # This should address any case of the database of customers being out of sync - # @TODO: Have a log suggesting a utility imports the customer - # - pass + else: + # # + # This should address any case of the database of customers being out of sync + # @TODO: Have a log suggesting a utility imports the customer + # + return json.dumps(plans) # # @TODO: Mark the plans the current user is signed up for