Refactor directory structure
This commit is contained in:
parent
f3a089df24
commit
c843e4b99a
0
QuizTheWord/__init__.py
Normal file
0
QuizTheWord/__init__.py
Normal file
0
QuizTheWord/admin/__init__.py
Normal file
0
QuizTheWord/admin/__init__.py
Normal 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")
|
@ -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",
|
@ -2,7 +2,7 @@ from os import environ
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
||||
load_dotenv(".env")
|
||||
load_dotenv()
|
||||
|
||||
|
||||
class Config:
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
@ -1,5 +1,4 @@
|
||||
import pathlib
|
||||
import database
|
||||
|
||||
|
||||
def parse_multiple_choice_questions(question_file: pathlib.Path):
|
||||
|
Loading…
Reference in New Issue
Block a user