added urlified title in title_url

This commit is contained in:
2022-05-01 16:55:15 +02:00
parent 0a307fc953
commit 7c7a0c3a54
16 changed files with 884 additions and 144 deletions

View File

@@ -52,6 +52,8 @@ def blog_edit(request):
if 'form.submitted' in request.params and form.validate():
if blog_id == '0':
form.populate_obj(entry)
entry.title_url = entry.slug
request.dbsession.add(entry)
return HTTPFound(location=request.route_url('home'))
@@ -97,11 +99,14 @@ def blog_search(request):
def topic(request):
topic = request.matchdict['topic']
# get the topic_name
topic_name = BlogRecordService.get_topic_name(request, topic)
# lire toutes les docs du topic
items = BlogRecordService.by_topic(request, topic)
return {
'page_title': topic.upper(),
'page_title': topic_name,
'topic': topic,
'items': items,
}