ScoDoc/app/views/absences.py

38 lines
756 B
Python

# -*- coding: utf-8 -*-
"""
Module absences: issu de ScoDoc7 / ZAbsences.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 absences_bp as bp
context = ScoDoc7Context(globals())
@bp.route("/")
@scodoc7func(context)
def index_html():
"""Un exemple de fonction ScoDoc 7 dans ZAbsences"""
return """<html>
<body><h1>ScoDoc 8 ZAbsences !</h1>
<p>ZAbsences ScoDoc 8</p>
<p>g.scodoc_dept=%(scodoc_dept)s</p>
</body>
</html>
""" % {
"scodoc_dept": g.scodoc_dept,
}