Finished most of admin console
Basic CRUD operations for managing registered admin users Encrypted personal information Still missing sections on managing tests and results Also missing dashboards/index/category landing pages
This commit is contained in:
0
ref-test/quiz/__init__.py
Normal file
0
ref-test/quiz/__init__.py
Normal file
8
ref-test/quiz/auth.py
Normal file
8
ref-test/quiz/auth.py
Normal file
@ -0,0 +1,8 @@
|
||||
from flask import Blueprint
|
||||
|
||||
auth = Blueprint(
|
||||
'quiz_auth',
|
||||
__name__,
|
||||
template_folder='templates',
|
||||
static_folder='static'
|
||||
)
|
9
ref-test/quiz/forms.py
Normal file
9
ref-test/quiz/forms.py
Normal file
@ -0,0 +1,9 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, PasswordField, BooleanField
|
||||
from wtforms.validators import InputRequired, Email, Length
|
||||
|
||||
class StartQuiz(FlaskForm):
|
||||
given_name = StringField('Given Name', validators=[InputRequired(), Length(max=15)])
|
||||
surname = StringField('Surname', validators=[InputRequired(), Length(max=15)])
|
||||
email = StringField('Email Address', validators=[InputRequired(), Email(message='You must enter a valid email address.'), Length(max=50)])
|
||||
club = StringField('Affiliated Club', validators=[InputRequired(), Length(max=50)])
|
0
ref-test/quiz/models.py
Normal file
0
ref-test/quiz/models.py
Normal file
0
ref-test/quiz/static/css/style.css
Normal file
0
ref-test/quiz/static/css/style.css
Normal file
0
ref-test/quiz/static/js/script.js
Normal file
0
ref-test/quiz/static/js/script.js
Normal file
43
ref-test/quiz/templates/quiz/base.html
Normal file
43
ref-test/quiz/templates/quiz/base.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
|
||||
crossorigin="anonymous">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/fontawesome.min.css"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<title>{% block title %} Site Title {% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar fixed-top navbar-expand-md navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a href="/" class="navbar-brand mb-0 h1">SKA Refereeing Test </a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- JQuery, Popper, and Bootstrap js dependencies -->
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
|
||||
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<!-- Custom js -->
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ url_for('.static', filename='js/script.js') }}"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
29
ref-test/quiz/views.py
Normal file
29
ref-test/quiz/views.py
Normal file
@ -0,0 +1,29 @@
|
||||
from flask import Blueprint
|
||||
|
||||
views = Blueprint(
|
||||
'quiz_views',
|
||||
__name__,
|
||||
template_folder='templates',
|
||||
static_folder='static'
|
||||
)
|
||||
|
||||
@views.route('/')
|
||||
@views.route('/home/')
|
||||
def home():
|
||||
return f'<h1>Ref Test Home Page</h1>'
|
||||
|
||||
@views.route('/privacy/')
|
||||
def privacy():
|
||||
return f"""<h1>Privacy Policy</h1>
|
||||
|
||||
<ul>
|
||||
<li>Website stores data using cookies.</li>
|
||||
<li>Site Administrators</li>
|
||||
<li>This web site only uses functional cookies to store information on log-in.</li>
|
||||
<li>User information for administrators will be encrypted and stored in a secure database for the purposes of administering this web site, and will be expunged when the user account is deleted.</li>
|
||||
<li>Test Candidate</li>
|
||||
<li>The web site will not be tracking your log in, and all information about your test attempt will be stored on your device until it is submitted to the server.</li>
|
||||
<li>Data from your test as well as identifying information about the candidate will be encrypted and stored in a secure database on the server, and will be retained for a period of HOW MANY? years for the SKA's records.</li>
|
||||
<ul>
|
||||
|
||||
"""
|
Reference in New Issue
Block a user