From 42f90edc22fef2d68f2076dca2cb145d2d8b84e8 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Wed, 19 Mar 2025 17:03:26 +0330 Subject: [PATCH] removing execptions.py --- backend/order/execptions.py | 2 -- backend/order/models.py | 1 - backend/order/views.py | 17 ++++------------- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 backend/order/execptions.py diff --git a/backend/order/execptions.py b/backend/order/execptions.py deleted file mode 100644 index c92b966..0000000 --- a/backend/order/execptions.py +++ /dev/null @@ -1,2 +0,0 @@ -class DiscountNotAvailableError(Exception): - pass \ No newline at end of file diff --git a/backend/order/models.py b/backend/order/models.py index 5c27f6c..25049ed 100644 --- a/backend/order/models.py +++ b/backend/order/models.py @@ -2,7 +2,6 @@ from django.db import models from account.models import User, UserAddressModel, PushSubscription from product.models import ProductModel, ProductVariant, ProductImageModel from django.utils import timezone -from .execptions import DiscountNotAvailableError from django_jalali.db import models as jmodels diff --git a/backend/order/views.py b/backend/order/views.py index e2425fe..2f2c5b5 100644 --- a/backend/order/views.py +++ b/backend/order/views.py @@ -1,5 +1,4 @@ from django.shortcuts import render -from .execptions import DiscountNotAvailableError from rest_framework.views import APIView, Response from django.shortcuts import get_object_or_404 from product.models import ProductVariant @@ -14,19 +13,11 @@ from azbankgateways.exceptions import AZBankGatewaysException from drf_spectacular.utils import extend_schema, OpenApiParameter, OpenApiTypes from utils.pagination import StructurePagination from order.models import OrderModel -try: - pass -except DiscountNotAvailableError: - pass from django.urls import reverse -""" - -add post -remove delete -show get - -pay -""" +# try: +# pass +# except DiscountNotAvailableError: +# pass