diff --git a/Lesson_4/04_Password Protecting a Resource/models.pyc b/Lesson_4/04_Password Protecting a Resource/models.pyc index c734696..d2e8399 100644 Binary files a/Lesson_4/04_Password Protecting a Resource/models.pyc and b/Lesson_4/04_Password Protecting a Resource/models.pyc differ diff --git a/Lesson_4/04_Password Protecting a Resource/views.py b/Lesson_4/04_Password Protecting a Resource/views.py index e6a6ac2..834052a 100644 --- a/Lesson_4/04_Password Protecting a Resource/views.py +++ b/Lesson_4/04_Password Protecting a Resource/views.py @@ -1,10 +1,12 @@ +#!/usr/bin/python + from models import Base, User from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine -from flask.ext.httpauth import HTTPBasicAuth +from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() diff --git "a/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/Solution Code/views.py" "b/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/Solution Code/views.py" index abb0186..833e1b8 100644 --- "a/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/Solution Code/views.py" +++ "b/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/Solution Code/views.py" @@ -1,9 +1,10 @@ +#!/usr/bin/python from models import Base, User, Bagel from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine -from flask.ext.httpauth import HTTPBasicAuth +from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() diff --git "a/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/starter_code/views.py" "b/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/starter_code/views.py" index a88914b..967cc38 100644 --- "a/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/starter_code/views.py" +++ "b/Lesson_4/05_Mom & Pop\342\200\231s Bagel Shop/starter_code/views.py" @@ -1,9 +1,10 @@ +#!/usr/bin/python from models import Base, User, Bagel from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker -from sqlalchemy import create_engine -from flask.ext.httpauth import HTTPBasicAuth +from sqlalchemy import create_enginefrom +from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() diff --git a/Lesson_4/07_Implementing Token-Based Authentication in Flask/views.py b/Lesson_4/07_Implementing Token-Based Authentication in Flask/views.py index ed81e4c..4f66f85 100644 --- a/Lesson_4/07_Implementing Token-Based Authentication in Flask/views.py +++ b/Lesson_4/07_Implementing Token-Based Authentication in Flask/views.py @@ -1,10 +1,11 @@ +#!/usr/bin/python from models import Base, User from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine +from flask_httpauth import HTTPBasicAuth -from flask.ext.httpauth import HTTPBasicAuth auth = HTTPBasicAuth() diff --git a/Lesson_4/08 _Regal Tree Foods/Solution Code/views.py b/Lesson_4/08 _Regal Tree Foods/Solution Code/views.py index 878a105..cca7a46 100644 --- a/Lesson_4/08 _Regal Tree Foods/Solution Code/views.py +++ b/Lesson_4/08 _Regal Tree Foods/Solution Code/views.py @@ -1,14 +1,15 @@ +#!/usr/bin/python from models import Base, User, Product from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine -from flask.ext.httpauth import HTTPBasicAuth +from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() -engine = create_engine('sqlite:///regalTree.db') +engine = create_engine('sqlite:///regalTree.db?check_same_thread=False') Base.metadata.bind = engine DBSession = sessionmaker(bind=engine) diff --git a/Lesson_4/08 _Regal Tree Foods/starter_code/views.py b/Lesson_4/08 _Regal Tree Foods/starter_code/views.py index 7e1f358..bcb59dc 100644 --- a/Lesson_4/08 _Regal Tree Foods/starter_code/views.py +++ b/Lesson_4/08 _Regal Tree Foods/starter_code/views.py @@ -1,14 +1,15 @@ +#!/usr/bin/python from models import Base, User, Product from flask import Flask, jsonify, request, url_for, abort, g from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine -from flask.ext.httpauth import HTTPBasicAuth +from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() -engine = create_engine('sqlite:///regalTree.db') +engine = create_engine('sqlite:///regalTree.db?check_same_thread=False') Base.metadata.bind = engine DBSession = sessionmaker(bind=engine)