31 lines
768 B
Python
31 lines
768 B
Python
"""
|
|
PN / Référentiel de compétences
|
|
|
|
Emmanuel Viennet, 2021
|
|
"""
|
|
|
|
from flask import url_for
|
|
from flask import jsonify
|
|
from flask import current_app, g, request
|
|
from flask.templating import render_template
|
|
from flask_login import current_user
|
|
from werkzeug.utils import redirect
|
|
|
|
from config import Config
|
|
|
|
from app import db
|
|
from app import models
|
|
|
|
from app.decorators import scodoc, permission_required
|
|
from app.models.but_refcomp import ApcReferentielCompetences
|
|
from app.scodoc.sco_permissions import Permission
|
|
from app.views import notes_bp as bp
|
|
|
|
|
|
@bp.route("/pn/comp/<int:refcomp_id>")
|
|
@scodoc
|
|
@permission_required(Permission.ScoView)
|
|
def refcomp(refcomp_id):
|
|
ref = ApcReferentielCompetences.query.get_or_404(refcomp_id)
|
|
return jsonify(ref.to_dict())
|