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')
def user_id(
id: int,
fields: list = ['id', 'title']
fields: list = ['id', 'name']
) -> dict:
"""Статья
"""

View File

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

View File

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

View File

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