示例#1
0
 def setup_method(self):
     from src.AuthenticationManager import DummyAuthenticationManager
     self.system = bootstrap_system(DummyAuthenticationManager())
示例#2
0
from src.BookingSystem import BookingSystem
from src.RatingManager import RatingManager

from src.ReferralSystem import ReferralSystem

app = Flask(__name__)
app.secret_key = "super extra secret"

# Authentication manager and System setup
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = "login"
booking_system = BookingSystem()

referral_system = ReferralSystem()
auth_manager = AuthenticationManager(login_manager)
hc_manager = HealthCentreManager()
user_manager = UserManager()
rating_manager = RatingManager(app.root_path)
system = bootstrap_system(auth_manager, app.root_path, hc_manager,
                          user_manager, booking_system, rating_manager,
                          referral_system)


@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)


import routes
示例#3
0
from flask import Flask
from flask_login import LoginManager
from src.AuthenticationManager import AuthenticationManager
from src.UserManager_UPDATED import UserManager
from src.CentreManager import CentreManager
from src.HealthCareSystem import HealthCareSystem
from src.client import bootstrap_system
from src.BookingManager import bookingManager

app = Flask(__name__)
app.secret_key = 'very-secret-123'

login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'

auth_manager = AuthenticationManager(login_manager)
user_manager = UserManager.load_data()
booking_manager = bookingManager.load_data()
centre_manager = CentreManager.load_data()

if len(user_manager._patients) == 0:
    system = bootstrap_system(user_manager, centre_manager, booking_manager, auth_manager)
else:
    system = HealthCareSystem(user_manager , centre_manager , booking_manager , auth_manager)

@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)
示例#4
0
from flask import Flask
from flask_login import LoginManager
from src.AuthenticationManager import AuthenticationManager
from src.client import bootstrap_system

app = Flask(__name__)
app.secret_key = 'very-secret-123'  # Used to add entropy

# Authentication manager and System setup
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'

auth_manager = AuthenticationManager(login_manager)
system = bootstrap_system(auth_manager)
示例#5
0
from flask import Flask
from flask_login import LoginManager
from src.client import bootstrap_system

app = Flask(__name__)
app.config.from_pyfile('flask_test.cfg')
app.secret_key = 'very-secret-123'  # Used to add entropy
system = bootstrap_system()

# Login manager stuff
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'


@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)


# Loads data
# warehouse, dm, user_db = OnlineShoppingData.load_data()
示例#6
0
文件: test.py 项目: A-Dajon/lab09
 def setUp(self):
     self.system = bootstrap_system(DummyAuthenticationManager())