diff --git a/flaskhello.py b/flaskhello.py index be78f33..05b8d60 100644 --- a/flaskhello.py +++ b/flaskhello.py @@ -9,7 +9,6 @@ # import html # import multiprocessing -from flask_mobility import Mobility from flask import Flask, render_template, Markup, request from flask_caching import Cache from wtforms import Form, BooleanField, FormField, FieldList, StringField, IntegerField, validators, SelectField @@ -17,7 +16,6 @@ http = urllib3.PoolManager() g_app = Flask(__name__) -Mobility(g_app) application = g_app # from flask_table import Table, Col @@ -179,12 +177,8 @@ def index(): page_order_s = str(page_order) - suffix = "" - if request.MOBILE: - suffix = ":MOBILE" - if page_order_s == g_standard_order_s: - full_page = g_c.Get(page_order_s + suffix) + full_page = g_c.Get(page_order_s) if full_page is not None: return full_page @@ -263,7 +257,7 @@ def index(): page = render_template('page.html', columns = result) if page_order_s == g_standard_order_s: - g_c.Put(page_order_s + suffix, page, timeout = EXPIRE_MINUTES) + g_c.Put(page_order_s, page, timeout = EXPIRE_MINUTES) return page class ROStringField(StringField): diff --git a/templates/page.html b/templates/page.html index f4489d0..28464d2 100644 --- a/templates/page.html +++ b/templates/page.html @@ -18,20 +18,20 @@ margin-bottom: .4em; } - {% if not request.MOBILE %} - /* Create three equal columns that floats next to each other */ - .column { - float: left; - width: 33.33%; - padding: 10px; + @media screen and (min-width: 769px) { + /* Create three equal columns that floats next to each other */ + .column { + float: left; + width: 33.33%; + padding: 10px; + } + + .row:after { + content: ""; + display: table; + clear: both; + } } - - .row:after { - content: ""; - display: table; - clear: both; - } - {% endif %}