Add FAQ page
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from from_root import from_root
|
||||
|
||||
|
||||
class PreloadService:
|
||||
def __init__(self) -> None:
|
||||
self._faq: list[tuple[str, str]] = []
|
||||
with open(from_root("src/elm/assets/preloaded_content/faq.txt"), "r") as faq_file:
|
||||
faq = faq_file.read()
|
||||
faq = faq.split("\n\n")
|
||||
for i in range(0, len(faq), 2):
|
||||
q, a = faq[i], faq[i + 1]
|
||||
self._faq.append((q, a))
|
||||
|
||||
@property
|
||||
def faq(self) -> list[tuple[str, str]]:
|
||||
return self._faq
|
||||
@@ -4,3 +4,4 @@ from .UserService import UserService, NameNotAllowedError, MailAlreadyInUseError
|
||||
from .LocalDataService import LocalData, LocalDataService
|
||||
from .MailingService import MailingService
|
||||
from .AccountingService import AccountingService
|
||||
from .PreloadService import PreloadService
|
||||
|
||||
Reference in New Issue
Block a user