Refactor directory structure

This commit is contained in:
Matthew Welch 2021-03-22 20:53:50 -07:00
parent f3a089df24
commit c843e4b99a
20 changed files with 13 additions and 13 deletions

0
QuizTheWord/__init__.py Normal file
View File

View File

View File

@ -1,8 +1,8 @@
import json
from flask import render_template, Blueprint, request, jsonify, redirect, url_for
from flask_security import roles_required, auth_required
import database
from database import get_all_questions, get_question
from flask_security import roles_required
from QuizTheWord import database
from QuizTheWord.database import get_question
Admin = Blueprint("admin", __name__, template_folder="templates")

View File

@ -1,8 +1,8 @@
import os
from flask import request, render_template, jsonify, Flask
from flask_security import Security, SQLAlchemySessionUserDatastore, RegisterForm
import database
from admin import admin
from flask_security import Security, SQLAlchemySessionUserDatastore
from QuizTheWord import database
from QuizTheWord.admin import admin
app = Flask(__name__)
environment_configuration = os.environ['CONFIGURATION_SETUP']
@ -35,10 +35,10 @@ def hidden_answer_category():
def multiple_choice_category():
easy = database.get_random_multiple_choice(1)
easy.randomize_answer_list()
medium = database.get_random_multiple_choice(2)
medium.randomize_answer_list()
hard = database.get_random_multiple_choice(3)
hard.randomize_answer_list()
# medium = database.get_random_multiple_choice(2)
# medium.randomize_answer_list()
# hard = database.get_random_multiple_choice(3)
# hard.randomize_answer_list()
return render_template(
"multiple_choice.html",
title="Multiple Choice",

View File

@ -2,7 +2,7 @@ from os import environ
from dotenv import load_dotenv
load_dotenv(".env")
load_dotenv()
class Config:

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

@ -1 +1,2 @@
runtime: python39
entrypoint: QuizTheWord/app.py

View File

@ -1,5 +1,4 @@
import pathlib
import database
def parse_multiple_choice_questions(question_file: pathlib.Path):