Experiment with using the new model in a few places
This commit is contained in:
parent
23873f7a52
commit
96db62fb35
|
@ -55,9 +55,9 @@ def get_bp():
|
||||||
@player_required_if_not_public
|
@player_required_if_not_public
|
||||||
def contents(name):
|
def contents(name):
|
||||||
articles = []
|
articles = []
|
||||||
filenames = g.lexicon.ctx.article.ls()
|
filenames = g.lexicon_.ctx.article.ls()
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
with g.lexicon.ctx.article.read(filename) as a:
|
with g.lexicon_.ctx.article.read(filename) as a:
|
||||||
articles.append({
|
articles.append({
|
||||||
'title': a.title,
|
'title': a.title,
|
||||||
'link': url_for('lexicon.article', name=name, title=filesafe_title(a.title)),
|
'link': url_for('lexicon.article', name=name, title=filesafe_title(a.title)),
|
||||||
|
@ -68,7 +68,7 @@ def get_bp():
|
||||||
@lexicon_param
|
@lexicon_param
|
||||||
@player_required_if_not_public
|
@player_required_if_not_public
|
||||||
def article(name, title):
|
def article(name, title):
|
||||||
with g.lexicon.ctx.article.read(title) as a:
|
with g.lexicon_.ctx.article.read(title) as a:
|
||||||
article = { **a, 'html': Markup(a['html']) }
|
article = { **a, 'html': Markup(a['html']) }
|
||||||
return render_template('lexicon/article.html', article=article)
|
return render_template('lexicon/article.html', article=article)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue