diff --git a/db_edit.py b/db_edit.py index 1ea710e..ba23d6c 100644 --- a/db_edit.py +++ b/db_edit.py @@ -1129,7 +1129,7 @@ def api_category_details(category_id): try: with db.conn.cursor() as cursor: cursor.execute(""" - SELECT AUTO_ID, ID, TITLE, description + SELECT AUTO_ID, ID, TITLE, description, image_url FROM categories WHERE ID = %s """, (category_id,)) @@ -1152,6 +1152,7 @@ def api_category_details(category_id): 'id': category['ID'], 'title': category['TITLE'] or '', 'description': category['description'] or '', + 'image_url': category['image_url'] or '', 'event_count': event_count }) except Exception as e: diff --git a/templates/index.html b/templates/index.html index 0b4e1e2..809f87e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1924,8 +1924,15 @@ const category = await response.json(); // Создаем HTML для деталей let detailsHtml = ` -