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