1
0
forked from ScoDoc/ScoDoc
ScoDoc-Front/app/views/scodoc.py

54 lines
1.6 KiB
Python
Raw Normal View History

2021-07-04 12:32:13 +02:00
# -*- mode: python -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# ScoDoc
#
# Copyright (c) 1999 - 2021 Emmanuel Viennet. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Emmanuel Viennet emmanuel.viennet@viennet.net
#
##############################################################################
"""
Module main: page d'accueil, avec liste des départements
Emmanuel Viennet, 2021
"""
import flask
2021-07-09 13:45:10 +02:00
from flask import render_template
2021-07-04 12:32:13 +02:00
from scodoc_manager import sco_mgr
2021-07-09 13:45:10 +02:00
from app.views import scodoc_bp as bp
2021-07-04 12:32:13 +02:00
from app.scodoc import VERSION
from app.scodoc.sco_permissions import Permission
@bp.route("/ScoDoc")
@bp.route("/ScoDoc/index")
def index():
dept_ids = sco_mgr.get_dept_ids()
return render_template(
"scodoc.html",
title=VERSION.SCONAME,
current_app=flask.current_app,
dept_ids=dept_ids,
Permission=Permission,
)