forked from ScoDoc/DocScoDoc
36 lines
655 B
Python
36 lines
655 B
Python
"""entreprises.__init__
|
|
"""
|
|
|
|
from flask import Blueprint
|
|
from app.scodoc import sco_etud
|
|
from app.auth.models import User
|
|
|
|
bp = Blueprint("entreprises", __name__)
|
|
|
|
LOGS_LEN = 5
|
|
|
|
|
|
@bp.app_template_filter()
|
|
def format_prenom(s):
|
|
return sco_etud.format_prenom(s)
|
|
|
|
|
|
@bp.app_template_filter()
|
|
def format_nom(s):
|
|
return sco_etud.format_nom(s)
|
|
|
|
|
|
@bp.app_template_filter()
|
|
def get_nomcomplet(s):
|
|
user = User.query.filter_by(user_name=s).first()
|
|
return user.get_nomcomplet()
|
|
|
|
|
|
@bp.app_template_filter()
|
|
def get_nomcomplet_by_id(s):
|
|
user = User.query.filter_by(id=s).first()
|
|
return user.get_nomcomplet()
|
|
|
|
|
|
from app.entreprises import routes
|