rename blueprint variables (blueprint_name -> bp) and view files (views.py -> routes.py)

This commit is contained in:
Patrick Jentsch
2021-09-13 11:45:43 +02:00
parent bc5c8ef074
commit 4950a407af
18 changed files with 85 additions and 85 deletions

View File

@ -73,5 +73,5 @@ SERVICES = {
}
services = Blueprint('services', __name__)
from . import views
bp = Blueprint('services', __name__)
from . import routes

View File

@ -2,7 +2,7 @@ from flask import (abort, flash, make_response, render_template, request,
url_for)
from flask_login import current_user, login_required
from werkzeug.utils import secure_filename
from . import services
from . import bp
from . import SERVICES
from .. import db
from .forms import AddJobForms
@ -12,14 +12,14 @@ import logging
import os
@services.route('/corpus-analysis')
@bp.route('/corpus-analysis')
@login_required
def corpus_analysis():
return render_template('services/corpus_analysis.html.j2',
title='Corpus analysis')
@services.route('/<service>', methods=['GET', 'POST'])
@bp.route('/<service>', methods=['GET', 'POST'])
@login_required
def service(service):
# Check if the requested service exist