ScoDoc-PE/app/views/scolar.py

38 lines
744 B
Python

# -*- coding: utf-8 -*-
"""
Module scolar: issu de ScoDoc7 / ZScolar.py
Emmanuel Viennet, 2021
"""
from flask import g
from flask import current_app
from app.decorators import (
scodoc7func,
ScoDoc7Context,
permission_required,
admin_required,
login_required,
)
from app.auth.models import Permission
from app.views import scolar_bp as bp
context = ScoDoc7Context(globals())
@bp.route("/about")
@scodoc7func(context)
def about():
"""Un exemple de fonction ScoDoc 7 dans ZScolar"""
return """<html>
<body><h1>ScoDoc 7 ZScolar !</h1>
<p>ZScolar ScoDoc 8</p>
<p>g.scodoc_dept=%(scodoc_dept)s</p>
</body>
</html>
""" % {
"scodoc_dept": g.scodoc_dept,
}