mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Change template base variable name
This commit is contained in:
parent
f348d1ed23
commit
eec056e010
@ -1,7 +1,7 @@
|
||||
from flask import Blueprint
|
||||
|
||||
|
||||
TEMPLATE_FOLDER = 'corpora/files'
|
||||
template_base_dir = 'corpora/files'
|
||||
|
||||
|
||||
bp = Blueprint('files', __name__)
|
||||
|
@ -11,7 +11,7 @@ import os
|
||||
from app import db
|
||||
from app.models import Corpus, CorpusFile, CorpusStatus
|
||||
from ..decorators import corpus_follower_permission_required
|
||||
from . import bp, TEMPLATE_FOLDER
|
||||
from . import bp, template_base_dir
|
||||
from .forms import CreateCorpusFileForm, UpdateCorpusFileForm
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ def create_corpus_file(corpus_id):
|
||||
flash(f'Corpus File "{corpus_file.filename}" added', category='corpus')
|
||||
return '', 201, {'Location': corpus.url}
|
||||
return render_template(
|
||||
f'{TEMPLATE_FOLDER}/create_corpus_file.html.j2',
|
||||
f'{template_base_dir}/create_corpus_file.html.j2',
|
||||
corpus=corpus,
|
||||
form=form,
|
||||
title='Add corpus file'
|
||||
@ -79,7 +79,7 @@ def corpus_file(corpus_id, corpus_file_id):
|
||||
flash(f'Corpus file "{corpus_file.filename}" updated', category='corpus')
|
||||
return redirect(corpus_file.corpus.url)
|
||||
return render_template(
|
||||
f'{TEMPLATE_FOLDER}/corpus_file.html.j2',
|
||||
f'{template_base_dir}/corpus_file.html.j2',
|
||||
corpus=corpus_file.corpus,
|
||||
corpus_file=corpus_file,
|
||||
form=form,
|
||||
|
Loading…
Reference in New Issue
Block a user