Fixed imports
This commit is contained in:
parent
6923095939
commit
e3106ec0ea
@ -2,9 +2,9 @@ import os
|
|||||||
|
|
||||||
from flask import Blueprint, jsonify, request
|
from flask import Blueprint, jsonify, request
|
||||||
|
|
||||||
from webservice.db import db
|
from db import db
|
||||||
from webservice.helper_functions import get_username_from_token_data, extract_token_data, get_token, get_user_id_from_username
|
from helper_functions import get_username_from_token_data, extract_token_data, get_token, get_user_id_from_username
|
||||||
from webservice.models import Keyword
|
from models import Keyword
|
||||||
|
|
||||||
keyword_blueprint = Blueprint('keyword', __name__, url_prefix='/api')
|
keyword_blueprint = Blueprint('keyword', __name__, url_prefix='/api')
|
||||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
@ -2,9 +2,9 @@ import os
|
|||||||
|
|
||||||
from flask import Blueprint, jsonify, request
|
from flask import Blueprint, jsonify, request
|
||||||
|
|
||||||
from webservice.db import db
|
from db import db
|
||||||
from webservice.helper_functions import get_username_from_token_data, extract_token_data, get_token, get_user_id_from_username
|
from helper_functions import get_username_from_token_data, extract_token_data, get_token, get_user_id_from_username
|
||||||
from webservice.models import Keyword, Share
|
from models import Share
|
||||||
|
|
||||||
shares_blueprint = Blueprint('share', __name__, url_prefix='/api')
|
shares_blueprint = Blueprint('share', __name__, url_prefix='/api')
|
||||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
@ -4,9 +4,9 @@ import os
|
|||||||
import jwt
|
import jwt
|
||||||
from flask import Blueprint, jsonify, request
|
from flask import Blueprint, jsonify, request
|
||||||
|
|
||||||
from webservice.db import db
|
from db import db
|
||||||
from webservice.helper_functions import check_password, hash_password, get_token, extract_token_data
|
from helper_functions import check_password, hash_password, get_token, extract_token_data
|
||||||
from webservice.models import User
|
from models import User
|
||||||
|
|
||||||
users_blueprint = Blueprint('users', __name__, url_prefix='/api')
|
users_blueprint = Blueprint('users', __name__, url_prefix='/api')
|
||||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
@ -1,11 +1,11 @@
|
|||||||
from flask import Flask
|
from flask import Flask
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from webservice.models import *
|
from models import *
|
||||||
from webservice.interface import interface
|
from blueprint_interface import interface_blueprint
|
||||||
from webservice.blueprints.keyword import keyword_blueprint
|
from api_blueprint_keyword import keyword_blueprint
|
||||||
from webservice.blueprints.shares import shares_blueprint
|
from api_blueprint_shares import shares_blueprint
|
||||||
from webservice.blueprints.user import users_blueprint
|
from api_blueprint_user import users_blueprint
|
||||||
|
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
@ -28,7 +28,7 @@ def create_app():
|
|||||||
application.register_blueprint(users_blueprint)
|
application.register_blueprint(users_blueprint)
|
||||||
|
|
||||||
# interface blueprint
|
# interface blueprint
|
||||||
application.register_blueprint(interface)
|
application.register_blueprint(interface_blueprint)
|
||||||
|
|
||||||
return application
|
return application
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@ import os
|
|||||||
|
|
||||||
from flask import Blueprint, render_template
|
from flask import Blueprint, render_template
|
||||||
|
|
||||||
interface = Blueprint('interface', __name__, url_prefix='/')
|
interface_blueprint = Blueprint('interface', __name__, url_prefix='/')
|
||||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||||
|
|
||||||
|
|
||||||
# Return all tags
|
# Return all tags
|
||||||
@interface.route('/', methods=['GET'])
|
@interface_blueprint.route('/', methods=['GET'])
|
||||||
def get_html():
|
def get_html():
|
||||||
return render_template("index.html")
|
return render_template("index.html")
|
@ -5,8 +5,8 @@ import uuid
|
|||||||
import jwt
|
import jwt
|
||||||
from flask import request
|
from flask import request
|
||||||
|
|
||||||
from webservice.db import db
|
from db import db
|
||||||
from webservice.models import User
|
from models import User
|
||||||
|
|
||||||
|
|
||||||
def hash_password(password):
|
def hash_password(password):
|
||||||
|
Loading…
Reference in New Issue
Block a user