This commit is contained in:
2024-03-03 20:56:09 +03:00
parent 90b832e3e8
commit f68f4f322a
5 changed files with 5 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ from ..mutations.user import user_as_dict
@jsonrpc.method('user') @jsonrpc.method('user')
def user_id( def user_id(
id: int, id: int,
fields: list = ['id', 'title'] fields: list = ['id', 'name']
) -> dict: ) -> dict:
"""Статья """Статья
""" """

View File

@@ -2,8 +2,7 @@
{% block content %} {% block content %}
<a href="/pages">Назад</a> <a href="/pages">Назад</a>
<h3> <h1>{{ pagedata['page'].title }}</h1>
{{ pagedata['page'].title }}</h3>
<hr /> <hr />
<p> <p>

View File

@@ -43,11 +43,7 @@ def page_id(id):
app.config['TITLE'] app.config['TITLE']
) )
pagedata['page'] = page.as_dict() pagedata['page'] = page
pagedata['page']['user'] = page.user.as_dict()
pagedata['page']['tags'] = []
for tagLink in page.tags:
pagedata['page']['tags'].append(tagLink.tag.as_dict())
body = render_template('guest/page.html', pagedata=pagedata) body = render_template('guest/page.html', pagedata=pagedata)
return body return body

View File

@@ -66,9 +66,9 @@ function User() {
]) ])
), ),
m('hr'), m('hr'),
m.trust(data.user.body),
breadcrumbs_render(),
); );
result.push(m.trust(data.user.body));
result.push(breadcrumbs_render());
}; };
return result return result
} }