Fixes: fix incorrect imports
This commit is contained in:
parent
00b8c6c336
commit
520b8ee8f7
3 changed files with 21 additions and 24 deletions
|
|
@ -5,9 +5,7 @@ from rest_framework import status
|
|||
from core.docs.drf import BASE_ERRORS
|
||||
from core.serializers import (
|
||||
AddOrderProductSerializer,
|
||||
AddressCreateSerializer,
|
||||
AddressSerializer,
|
||||
AddressSuggestionSerializer,
|
||||
AddWishlistProductSerializer,
|
||||
AttributeDetailSerializer,
|
||||
AttributeGroupDetailSerializer,
|
||||
|
|
@ -32,6 +30,7 @@ from core.serializers import (
|
|||
WishlistDetailSerializer,
|
||||
WishlistSimpleSerializer,
|
||||
)
|
||||
from core.serializers.utility import AddressCreateSerializer, AddressSuggestionSerializer
|
||||
from payments.serializers import TransactionProcessSerializer
|
||||
|
||||
ATTRIBUTE_GROUP_SCHEMA = {
|
||||
|
|
@ -292,85 +291,85 @@ PRODUCT_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="uuid",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(exact) Product UUID"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="name",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(icontains) Product name"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="categories",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(list) Category names, case-insensitive"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="category_uuid",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(exact) Category UUID"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="tags",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(list) Tag names, case-insensitive"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="min_price",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(gte) Minimum stock price"),
|
||||
type=float,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="max_price",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(lte) Maximum stock price"),
|
||||
type=float,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="is_active",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(exact) Only active products"),
|
||||
type=bool,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="brand",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(iexact) Brand name"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="attributes",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=ATTRIBUTES_DESC,
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="quantity",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(gt) Minimum stock quantity"),
|
||||
type=int,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="slug",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(exact) Product slug"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="is_digital",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("(exact) Digital vs. physical"),
|
||||
type=bool,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="order_by",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_(
|
||||
"Comma-separated list of fields to sort by. "
|
||||
"Prefix with `-` for descending. \n"
|
||||
|
|
@ -390,7 +389,7 @@ PRODUCT_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="lookup",
|
||||
location=OpenApiParameter.PATH,
|
||||
location="path",
|
||||
description=_("Product UUID or slug"),
|
||||
type=str,
|
||||
),
|
||||
|
|
@ -412,7 +411,7 @@ PRODUCT_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="lookup",
|
||||
location=OpenApiParameter.PATH,
|
||||
location="path",
|
||||
description=_("Product UUID or slug"),
|
||||
type=str,
|
||||
),
|
||||
|
|
@ -427,7 +426,7 @@ PRODUCT_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="lookup",
|
||||
location=OpenApiParameter.PATH,
|
||||
location="path",
|
||||
description=_("Product UUID or slug"),
|
||||
type=str,
|
||||
),
|
||||
|
|
@ -442,7 +441,7 @@ PRODUCT_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="lookup",
|
||||
location=OpenApiParameter.PATH,
|
||||
location="path",
|
||||
description=_("Product UUID or slug"),
|
||||
type=str,
|
||||
),
|
||||
|
|
@ -505,13 +504,13 @@ ADDRESS_SCHEMA = {
|
|||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="q",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("raw data query string, please append with data from geo-IP endpoint"),
|
||||
type=str,
|
||||
),
|
||||
OpenApiParameter(
|
||||
name="limit",
|
||||
location=OpenApiParameter.QUERY,
|
||||
location="query",
|
||||
description=_("limit the results amount, 1 < limit < 10, default: 5"),
|
||||
type=int,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ from evibes.settings.base import REDIS_PASSWORD, getenv
|
|||
|
||||
CACHES = {
|
||||
"default": {
|
||||
# "BACKEND": "django_redis.cache.RedisCache",
|
||||
"BACKEND": "django_prometheus.cache.backends.redis.RedisCache",
|
||||
"LOCATION": getenv("CELERY_BROKER_URL", f"redis://:{REDIS_PASSWORD}@redis:6379/0"),
|
||||
"OPTIONS": {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ from evibes.settings.base import * # noqa: F403
|
|||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django_prometheus.db.backends.postgis",
|
||||
# "ENGINE": "django.contrib.gis.db.backends.postgis",
|
||||
"NAME": getenv("POSTGRES_DB"), # noqa: F405
|
||||
"USER": getenv("POSTGRES_USER"), # noqa: F405
|
||||
"PASSWORD": getenv("POSTGRES_PASSWORD"), # noqa: F405
|
||||
|
|
|
|||
Loading…
Reference in a new issue