Skip to content

Commit

Permalink
Run Black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
burritosoftware committed Jun 25, 2024
1 parent 2cf5a9d commit af78a42
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
"redirect_uris": [oidc_redirect_uri],
}
}
oidc_logout_url = ""
oidc_logout_url = ""
2 changes: 1 addition & 1 deletion food.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"webApi_order_done": responses.order_done,
"webApi_inquiry_done": responses.inquiry_done,
"webApi_basket_delete": responses.basket_delete,
"webApi_basket_modify": responses.basket_modify
"webApi_basket_modify": responses.basket_modify,
}


Expand Down
1 change: 1 addition & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

db = SQLAlchemy()


class DictType(sqlalchemy.types.TypeDecorator):
impl = sqlalchemy.Text()

Expand Down
19 changes: 9 additions & 10 deletions responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ def shop_one(request):
},
},
# Setting values to null will trigger the confirmation screen
"selList": {
},
"selList": {},
"holiday": "We're on holiday. Back soon!",
"status": {
"isOpen": 1,
Expand Down Expand Up @@ -500,14 +499,14 @@ def category_list(request):
return {
"response": {
"Pizza": formulate_restaurant(CategoryTypes.Pizza),
# "Bento": formulate_restaurant(CategoryTypes.Bento_Box),
# "Sushi": formulate_restaurant(CategoryTypes.Sushi),
# "Fish": formulate_restaurant(CategoryTypes.Fish),
#"Seafood": formulate_restaurant(CategoryTypes.Seafood),
#"American": formulate_restaurant(CategoryTypes.Western),
#"Fast": formulate_restaurant(CategoryTypes.Fast_Food),
#"Indian": formulate_restaurant(CategoryTypes.Curry),
#"Party": formulate_restaurant(CategoryTypes.Party_Food),
# "Bento": formulate_restaurant(CategoryTypes.Bento_Box),
# "Sushi": formulate_restaurant(CategoryTypes.Sushi),
# "Fish": formulate_restaurant(CategoryTypes.Fish),
# "Seafood": formulate_restaurant(CategoryTypes.Seafood),
# "American": formulate_restaurant(CategoryTypes.Western),
# "Fast": formulate_restaurant(CategoryTypes.Fast_Food),
# "Indian": formulate_restaurant(CategoryTypes.Curry),
# "Party": formulate_restaurant(CategoryTypes.Party_Food),
"Drinks": formulate_restaurant(CategoryTypes.Others),
"Other": formulate_restaurant(CategoryTypes.Test),
"Placeholder": formulate_restaurant(CategoryTypes.Others),
Expand Down
3 changes: 3 additions & 0 deletions thepantry/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

oidc = OpenIDConnect(app)


@app.context_processor
def inject_oidc():
return dict(oidc=oidc)


@app.route("/thepantry")
@app.route("/thepantry/")
def root():
Expand All @@ -29,6 +31,7 @@ def login():
def admin():
return render_template("pantry.html")


@app.route("/thepantry/logout")
@oidc.require_login
def logout():
Expand Down
1 change: 1 addition & 0 deletions thepantry/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from wtforms import StringField, SubmitField, SelectField, FileField
from models import CategoryTypes


class FoodTypes(FlaskForm):
food = SelectField(
"Food Types",
Expand Down
1 change: 1 addition & 0 deletions thepantry/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from thepantry.operations import manage_delete_item
from thepantry.admin import oidc


@app.route("/thepantry/restaurants/<restaurant_id>/menus/<menu_code>/items")
@oidc.require_login
def list_food_items(restaurant_id, menu_code):
Expand Down
1 change: 1 addition & 0 deletions thepantry/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from thepantry.operations import manage_delete_item
from thepantry.admin import oidc


@app.route("/thepantry/restaurants/<restaurant_id>/menus")
@oidc.require_login
def list_menus(restaurant_id):
Expand Down
1 change: 1 addition & 0 deletions thepantry/restaurants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os
from thepantry.admin import oidc


@app.route("/thepantry/restaurants", methods=["GET", "POST"])
@oidc.require_login
def select_food_type():
Expand Down

0 comments on commit af78a42

Please sign in to comment.