Фильтры
-Настройки отправки
-Можно менять перед каждой отправкой картины
-diff --git a/main.ipynb b/main.ipynb index a0ac301..595a012 100644 --- a/main.ipynb +++ b/main.ipynb @@ -4601,13 +4601,14 @@ "\n", " data = [doc async for doc in cursor]\n", " exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).to_list()\n", - "\n", + " competitions = await competitions_col.find({'_id': {'$in': [i.get('competitions') for i in data if i.get('competitions')]}}).to_list()\n", " return templates.TemplateResponse(\n", " request=request,\n", " name=\"profile/delivery.html\",\n", " context={\n", " \"user\": user,\n", " \"exhibitions\": exhibitions,\n", + " \"competitions\": competitions,\n", " \"data\": data,\n", " \"page_title\": \"Доставка\",\n", " \"active_section\": \"delivery\"\n", diff --git a/main.py b/main.py index 14cfa06..17f1b77 100644 --- a/main.py +++ b/main.py @@ -3505,13 +3505,14 @@ async def profile_delivery( data = [doc async for doc in cursor] exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).to_list() - + competitions = await competitions_col.find({'_id': {'$in': [i.get('competitions') for i in data if i.get('competitions')]}}).to_list() return templates.TemplateResponse( request=request, name="profile/delivery.html", context={ "user": user, "exhibitions": exhibitions, + "competitions": competitions, "data": data, "page_title": "Доставка", "active_section": "delivery" diff --git a/templates/profile/delivery.html b/templates/profile/delivery.html index 0194d65..3784c39 100644 --- a/templates/profile/delivery.html +++ b/templates/profile/delivery.html @@ -4,6 +4,7 @@ {% import "components/profile_card.html" as profile_card %} {% import "components/profile_nav.html" as profile_nav %} {% import "competition/list.html" as competition %} +{% import "competition/card.html" as card %} {% block title %}Где картины{% endblock %} @@ -100,223 +101,48 @@
Можно менять перед каждой отправкой картины
-{{i.topic}}
+{{ i.user.username }}
+Подробнее
+ +{{ ( i._id.generation_time.strftime('%d.%m.%Y')) if i._id else ''}}
+