mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
BOO
This commit is contained in:
parent
bcca5c9a87
commit
d2449f6cf7
2 changed files with 106 additions and 1 deletions
101
db.py
101
db.py
|
@ -967,6 +967,107 @@ class Halloween(Base):
|
|||
return (completed_a and completed_b and completed_c and completed_d and completed_e
|
||||
and completed_f and completed_g and completed_h and completed_i and completed_j)
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_a_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_a is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_b_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_b is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_c_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_c is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_d_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_d is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_e_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_e is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_f_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_f is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_g_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_g is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_h_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_h is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_i_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_i is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def puzzle_piece_j_complete() -> bool:
|
||||
session = db.Session()
|
||||
halloweens = session.query(Halloween).all()
|
||||
session.close()
|
||||
for halloween in halloweens:
|
||||
if halloween.puzzle_piece_j is not None:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# If run as script, create all the tables in the db
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
{% block prehead %}{% endblock %}
|
||||
<title>{% block pagetitle %}{% endblock %} - Royal Games</title>
|
||||
<link href="{{ url_for('static', filename='pygments.css') }}" rel="stylesheet" type="text/css">
|
||||
{% if config["DEBUG"] %}
|
||||
<link href="{{ url_for('static', filename='spoopy.less') }}" rel="stylesheet/less" type="text/css">
|
||||
{% else %}
|
||||
<link href="{{ url_for('static', filename='nryg.less') }}" rel="stylesheet/less" type="text/css">
|
||||
{% endif %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/3.0.2/less.min.js"></script>
|
||||
{% block posthead %}{% endblock %}
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue