Move home templates into server submodule
This commit is contained in:
parent
07d590bee4
commit
1ead09cf47
@ -9,7 +9,9 @@ from amanuensis.server.helpers import admin_required
|
||||
from amanuensis.user import load_all_users
|
||||
|
||||
|
||||
bp_home = Blueprint('home', __name__, url_prefix='/home')
|
||||
bp_home = Blueprint('home', __name__,
|
||||
url_prefix='/home',
|
||||
template_folder='.')
|
||||
|
||||
|
||||
@bp_home.route('/', methods=['GET'])
|
||||
@ -24,7 +26,7 @@ def home():
|
||||
elif lexicon.cfg.join.public:
|
||||
public_lexicons.append(lexicon)
|
||||
return render_template(
|
||||
'home/home.jinja',
|
||||
'home.root.jinja',
|
||||
user_lexicons=user_lexicons,
|
||||
public_lexicons=public_lexicons)
|
||||
|
||||
@ -36,7 +38,7 @@ def admin():
|
||||
root: RootConfigDirectoryContext = current_app.config['root']
|
||||
users = list(load_all_users(root))
|
||||
lexicons = list(load_all_lexicons(root))
|
||||
return render_template('home/admin.jinja', users=users, lexicons=lexicons)
|
||||
return render_template('home.admin.jinja', users=users, lexicons=lexicons)
|
||||
|
||||
|
||||
@bp_home.route("/admin/create/", methods=['GET', 'POST'])
|
||||
@ -55,4 +57,4 @@ def admin_create():
|
||||
cfg.prompt = prompt
|
||||
return redirect(url_for('lexicon.session', name=lexicon_name))
|
||||
|
||||
return render_template('home/create.jinja', form=form)
|
||||
return render_template('home.create.jinja', form=form)
|
Loading…
Reference in New Issue
Block a user