slugify to a max of 50 and remove date

This commit is contained in:
2026-05-30 09:18:42 +03:00
parent d87d9c2977
commit ae9d33473c
3 changed files with 6 additions and 5 deletions

View File

@@ -106,7 +106,7 @@ def edit_topic_post(topic_id):
topic.update({
'name': target_name,
'description': request.form.get('description').strip(),
'slug': slugify(target_name[:50]),
'slug': slugify(target_name, max_length=50),
})
return redirect(url_for('topics.topic_by_id', topic_id=topic.id))