Some PEP8, remove insecure_lib
This commit is contained in:
parent
8c464ed73c
commit
76f7d4c56d
6 changed files with 5 additions and 8 deletions
|
@ -24,5 +24,6 @@ class PrefixFix(object):
|
||||||
environ['PATH_INFO'] = path[len(self.script_name):]
|
environ['PATH_INFO'] = path[len(self.script_name):]
|
||||||
return self.app(environ, start_response)
|
return self.app(environ, start_response)
|
||||||
|
|
||||||
|
|
||||||
if not app.debug:
|
if not app.debug:
|
||||||
app.wsgi_app = PrefixFix(app.wsgi_app, '/james')
|
app.wsgi_app = PrefixFix(app.wsgi_app, '/james')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# config
|
# config
|
||||||
|
|
||||||
|
|
||||||
class Configuration(object):
|
class Configuration(object):
|
||||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///james.db'
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///james.db'
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
|
@ -53,6 +53,7 @@ def chinees_create_entry(zetmeel, vlees="", saus=""):
|
||||||
entry.configure(chinees, "{} {} {}".format(zetmeel, vlees, saus).rstrip(), 550)
|
entry.configure(chinees, "{} {} {}".format(zetmeel, vlees, saus).rstrip(), 550)
|
||||||
db.session.add(entry)
|
db.session.add(entry)
|
||||||
|
|
||||||
|
|
||||||
for zetmeel, vlees, saus in product(zetmelen, vlezen, sauzen):
|
for zetmeel, vlees, saus in product(zetmelen, vlezen, sauzen):
|
||||||
chinees_create_entry(zetmeel, vlees, saus)
|
chinees_create_entry(zetmeel, vlees, saus)
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ class OrderItemForm(Form):
|
||||||
def populate(self, location):
|
def populate(self, location):
|
||||||
self.product_id.choices = [(i.id, (i.name + ": " + euro(i.price))) for i in location.products]
|
self.product_id.choices = [(i.id, (i.name + ": " + euro(i.price))) for i in location.products]
|
||||||
|
|
||||||
|
|
||||||
class AnonOrderItemForm(OrderItemForm):
|
class AnonOrderItemForm(OrderItemForm):
|
||||||
name = StringField('Name', validators=[validators.required()])
|
name = StringField('Name', validators=[validators.required()])
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ class AnonOrderItemForm(OrderItemForm):
|
||||||
if self.name.data is None:
|
if self.name.data is None:
|
||||||
self.name.data = session.get('anon_name', None)
|
self.name.data = session.get('anon_name', None)
|
||||||
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
rv = OrderForm.validate(self)
|
rv = OrderForm.validate(self)
|
||||||
if not rv:
|
if not rv:
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# TEMPORARY ## SHOULD BE DELETED AFTER KELDER.ZEUS HAS THEIR CERTIFICATE
|
|
||||||
import os
|
|
||||||
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
|
|
||||||
|
|
||||||
|
|
||||||
from views import *
|
from views import *
|
||||||
|
|
||||||
from app import app, db
|
from app import app, db
|
||||||
|
@ -15,7 +10,5 @@ from utils import *
|
||||||
from views import *
|
from views import *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='0.0.0.0', port=80)
|
app.run(host='0.0.0.0', port=80)
|
||||||
|
|
|
@ -14,6 +14,7 @@ login_manager.init_app(app)
|
||||||
def load_user(userid):
|
def load_user(userid):
|
||||||
return User.query.filter_by(id=userid).first()
|
return User.query.filter_by(id=userid).first()
|
||||||
|
|
||||||
|
|
||||||
@app.route('/login')
|
@app.route('/login')
|
||||||
def login():
|
def login():
|
||||||
return zeus_login()
|
return zeus_login()
|
||||||
|
|
Loading…
Reference in a new issue