Merge branch 'main' into storefront-nuxt

This commit is contained in:
Egor Pavlovich Gorbunov 2025-12-08 22:01:56 +03:00
commit 90bb8c3326
6 changed files with 395 additions and 496 deletions

View file

@ -107,7 +107,7 @@ def process_order_changes(instance: Order, created: bool, **kwargs: dict[Any, An
if instance.status in ["CREATED", "PAYMENT"]: if instance.status in ["CREATED", "PAYMENT"]:
if not instance.is_whole_digital: if not instance.is_whole_digital:
send_order_created_email.delay(instance.uuid) # type: ignore [attr-defined] send_order_created_email.delay(str(instance.uuid))
for order_product in instance.order_products.filter(status="DELIVERING", product__is_digital=True): for order_product in instance.order_products.filter(status="DELIVERING", product__is_digital=True):
if not order_product.product: if not order_product.product:
@ -154,7 +154,7 @@ def process_order_changes(instance: Order, created: bool, **kwargs: dict[Any, An
if instance.status == "FINISHED" and not instance.attributes.get("system_email_sent", False): if instance.status == "FINISHED" and not instance.attributes.get("system_email_sent", False):
instance.attributes["system_email_sent"] = True instance.attributes["system_email_sent"] = True
instance.save() instance.save()
send_order_finished_email.delay(instance.uuid) # type: ignore [attr-defined] send_order_finished_email.delay(str(instance.uuid))
# noinspection PyUnusedLocal # noinspection PyUnusedLocal
@ -179,4 +179,4 @@ def update_category_name_lang(instance: Category, created: bool, **kwargs: dict[
@receiver(post_save, sender=PromoCode) @receiver(post_save, sender=PromoCode)
def send_promocode_creation_email(instance: PromoCode, created: bool, **kwargs: dict[Any, Any]) -> None: def send_promocode_creation_email(instance: PromoCode, created: bool, **kwargs: dict[Any, Any]) -> None:
if created: if created:
send_promocode_created_email.delay(instance.uuid) # type: ignore [attr-defined] send_promocode_created_email.delay(str(instance.uuid))

View file

@ -52,4 +52,4 @@ def process_transaction_changes(instance: Transaction, created: bool, **kwargs:
success = instance.process.get("success", False) success = instance.process.get("success", False)
if ("success" in status or success) and (instance.process.get("notify", False)): if ("success" in status or success) and (instance.process.get("notify", False)):
balance_deposit_email.delay(instance.uuid) # type: ignore [attr-defined] balance_deposit_email.delay(str(instance.uuid))

View file

@ -207,7 +207,7 @@ class TokenRefreshSerializer(Serializer):
self.retrieve_user: bool = retrieve_user self.retrieve_user: bool = retrieve_user
def validate(self, attrs: dict[str, Any]) -> dict[str, str]: def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:
refresh = self.token_class(attrs["refresh"]) refresh = self.token_class(attrs["refresh"])
data: dict[str, str | dict[str, Any]] = {"access": str(refresh.access_token)} data: dict[str, str | dict[str, Any]] = {"access": str(refresh.access_token)}

View file

@ -60,7 +60,7 @@ class UserViewSet(
with suppress(User.DoesNotExist): with suppress(User.DoesNotExist):
user = User.objects.get(email=request.data.get("email")) user = User.objects.get(email=request.data.get("email"))
if user: if user:
send_reset_password_email_task.delay(user_pk=user.uuid) # type: ignore [attr-defined] send_reset_password_email_task.delay(user_pk=str(user.uuid))
return Response(status=status.HTTP_200_OK) return Response(status=status.HTTP_200_OK)
@action(detail=True, methods=["put"], permission_classes=[IsAuthenticated]) @action(detail=True, methods=["put"], permission_classes=[IsAuthenticated])

View file

@ -6,13 +6,13 @@ authors = [{ name = "fureunoir", email = "contact@fureunoir.com" }]
readme = "README.md" readme = "README.md"
requires-python = ">=3.12,<=3.13" requires-python = ">=3.12,<=3.13"
dependencies = [ dependencies = [
"aiogram==3.22.0", "aiogram==3.23.0",
"aiosmtpd==1.4.6", "aiosmtpd==1.4.6",
"channels==4.3.1", "channels==4.3.1",
"channels-redis>=4.3.0", "channels-redis>=4.3.0",
"colorlog==6.10.1", "colorlog==6.10.1",
"coverage==7.11.3", "coverage==7.13.0",
"click==8.3.0", "click==8.3.1",
"cryptography==46.0.3", "cryptography==46.0.3",
"django==5.2.8", "django==5.2.8",
"django-cacheops==7.2", "django-cacheops==7.2",
@ -46,7 +46,7 @@ dependencies = [
"djangorestframework-xml==2.0.0", "djangorestframework-xml==2.0.0",
"djangorestframework-yaml==2.0.0", "djangorestframework-yaml==2.0.0",
"djangoql>=0.18.1", "djangoql>=0.18.1",
"docutils>=0.21.2", "docutils>=0.22.3",
"drf-spectacular[sidecar]==0.29.0", "drf-spectacular[sidecar]==0.29.0",
"drf-spectacular-websocket>=1.3.1", "drf-spectacular-websocket>=1.3.1",
"elasticsearch-dsl==8.18.0", "elasticsearch-dsl==8.18.0",
@ -61,15 +61,15 @@ dependencies = [
"pip>=25.3", "pip>=25.3",
"polib==1.2.0", "polib==1.2.0",
"PyJWT==2.10.1", "PyJWT==2.10.1",
"pytest==9.0.1", "pytest==9.0.2",
"pytest-django==4.11.1", "pytest-django==4.11.1",
"python-slugify==8.0.4", "python-slugify==8.0.4",
"psutil==7.1.3", "psutil==7.1.3",
"psycopg2==2.9.11", "psycopg2==2.9.11",
"pymdown-extensions==10.17.1", "pymdown-extensions==10.18",
"redis==7.0.1", "redis==7.1.0",
"requests==2.32.5", "requests==2.32.5",
"sentry-sdk[django,celery,opentelemetry]==2.44.0", "sentry-sdk[django,celery,opentelemetry]==2.47.0",
"six==1.17.0", "six==1.17.0",
"swapper==1.4.0", "swapper==1.4.0",
"uvicorn==0.38.0", "uvicorn==0.38.0",
@ -81,21 +81,21 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
graph = ["pygraphviz==1.14; sys_platform != 'win32'"] graph = ["pygraphviz==1.14; sys_platform != 'win32'"]
worker = [ worker = [
"celery==5.5.3", "celery==5.6.0",
"django-celery-beat==2.8.1", "django-celery-beat==2.8.1",
"django-celery-results==2.6.0", "django-celery-results==2.6.0",
"celery-prometheus-exporter==1.7.0", "celery-prometheus-exporter==1.7.0",
] ]
linting = [ linting = [
"isort==7.0.0", "isort==7.0.0",
"mypy==1.18.2", "mypy==1.19.0",
"mypy-extensions==1.1.0", "mypy-extensions==1.1.0",
"ruff==0.14.5", "ruff==0.14.8",
"celery-stubs==0.1.3", "celery-stubs==0.1.3",
"celery-types>=0.23.0",
] ]
openai = ["openai==2.6.1"] openai = ["openai==2.9.0"]
jupyter = ["jupyter==1.1.1"] jupyter = ["jupyter==1.1.1"]
docs = ["sphinx==8.2.3", "sphinx-rtd-theme==3.0.2", "m2r2==0.3.4"]
[tool.uv] [tool.uv]
package = false package = false

853
uv.lock

File diff suppressed because it is too large Load diff