Update API version to 2.6.0 and reformat migration files

Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-05-06 19:19:49 +03:00
parent 7d6eb8a27a
commit 12ccd04943
15 changed files with 2356 additions and 1691 deletions

View file

@ -1,15 +1,15 @@
# Generated by Django 5.1.8 on 2025-04-28 11:56
import uuid
import django.db.models.deletion
import django_extensions.db.fields
import markdown_field.fields
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
@ -20,12 +20,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='PostTag',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('tag_name', models.CharField(help_text='internal tag identifier for the post tag', max_length=255, verbose_name='tag name')),
('name', models.CharField(help_text='user-friendly name for the post tag', max_length=255, unique=True, verbose_name='tag display name')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('tag_name', models.CharField(help_text='internal tag identifier for the post tag', max_length=255,
verbose_name='tag name')),
('name', models.CharField(help_text='user-friendly name for the post tag', max_length=255, unique=True,
verbose_name='tag display name')),
],
options={
'verbose_name': 'post tag',
@ -35,15 +45,24 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Post',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('title', models.CharField()),
('content', markdown_field.fields.MarkdownField(blank=True, null=True, verbose_name='content')),
('file', models.FileField(blank=True, null=True, upload_to='posts/')),
('slug', models.SlugField(allow_unicode=True)),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to=settings.AUTH_USER_MODEL)),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts',
to=settings.AUTH_USER_MODEL)),
('tags', models.ManyToManyField(to='blog.posttag')),
],
options={

View file

@ -167,7 +167,8 @@ class BuyOrder(BaseMutation):
description = _("buy an order")
class Arguments:
order_uuid = UUID(required=True)
order_uuid = UUID(required=False)
order_hr_id = String(required=False)
force_balance = Boolean(required=False)
force_payment = Boolean(required=False)
promocode_uuid = UUID(required=False)
@ -176,10 +177,18 @@ class BuyOrder(BaseMutation):
transaction = Field(TransactionType, required=False)
@staticmethod
def mutate(_parent, info, order_uuid, force_balance=False, force_payment=False, promocode_uuid=None):
def mutate(_parent, info, order_uuid=None, order_hr_id=None, force_balance=False, force_payment=False,
promocode_uuid=None):
if not any([order_uuid, order_hr_id]) or all([order_uuid, order_hr_id]):
raise BadRequest(_("please provide either order_uuid or order_hr_id - mutually exclusive"))
user = info.context.user
try:
order = Order.objects.get(user=user, uuid=order_uuid)
if order_uuid:
order = Order.objects.get(user=user, uuid=order_uuid)
if order_hr_id:
order = Order.objects.get(user=user, human_readable_id=order_hr_id)
instance = order.buy(
force_balance=force_balance, force_payment=force_payment, promocode_uuid=promocode_uuid
)
@ -212,7 +221,7 @@ class BuyUnregisteredOrder(BaseMutation):
@staticmethod
def mutate(_parent, info, products, customer_name, customer_email, customer_phone, customer_billing_address,
payment_method, customer_shipping_address=None, promocode_uuid=None ):
payment_method, customer_shipping_address=None, promocode_uuid=None):
order = Order.objects.create(status="MOMENTAL")
transaction = order.buy_without_registration(products=products,
promocode_uuid=promocode_uuid,

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
# Generated by Django 5.1.5 on 2025-03-24 14:04
import core.validators
from django.db import migrations, models
import core.validators
class Migration(migrations.Migration):
dependencies = [
('core', '0006_alter_order_status'),
]
@ -14,6 +14,9 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='category',
name='image',
field=models.ImageField(blank=True, help_text='upload an image representing this category', null=True, upload_to='categories/', validators=[core.validators.validate_category_image_dimensions], verbose_name='category image'),
field=models.ImageField(blank=True, help_text='upload an image representing this category', null=True,
upload_to='categories/',
validators=[core.validators.validate_category_image_dimensions],
verbose_name='category image'),
),
]

View file

@ -1,13 +1,13 @@
# Generated by Django 5.1.5 on 2025-04-10 15:55
import uuid
import django.db.models.deletion
import django_extensions.db.fields
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0007_alter_category_image'),
]
@ -16,12 +16,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='DigitalAssetDownload',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('num_downloads', models.IntegerField(default=0)),
('order_product', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='download', to='core.orderproduct')),
('order_product',
models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='download',
to='core.orderproduct')),
],
options={
'verbose_name': 'download',

View file

@ -1,14 +1,15 @@
# Generated by Django 5.1.5 on 2025-04-15 09:15
import core.utils
import uuid
import django.db.models.deletion
import django_extensions.db.fields
import uuid
from django.db import migrations, models
import core.utils
class Migration(migrations.Migration):
dependencies = [
('core', '0008_digitalassetdownload'),
]
@ -17,12 +18,21 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Documentary',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('document', models.FileField(upload_to=core.utils.get_product_uuid_as_path)),
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documentaries', to='core.product')),
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documentaries',
to='core.product')),
],
options={
'verbose_name': 'documentary',

View file

@ -1,11 +1,11 @@
# Generated by Django 5.1.8 on 2025-04-18 11:34
import core.validators
from django.db import migrations, models
import core.validators
class Migration(migrations.Migration):
dependencies = [
('core', '0010_product_partnumber'),
]
@ -14,106 +14,131 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='brand',
name='big_logo',
field=models.ImageField(blank=True, help_text='upload a big logo representing this brand', null=True, upload_to='brands/', validators=[core.validators.validate_category_image_dimensions], verbose_name='brand big image'),
field=models.ImageField(blank=True, help_text='upload a big logo representing this brand', null=True,
upload_to='brands/',
validators=[core.validators.validate_category_image_dimensions],
verbose_name='brand big image'),
),
migrations.AddField(
model_name='brand',
name='description',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_ar_AR',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_cs_CZ',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_da_DK',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_de_DE',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_en_GB',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_en_US',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_es_ES',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_fr_FR',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_hi_IN',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_it_IT',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_ja_JP',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_kk_KZ',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_nl_NL',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_pl_PL',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_pt_BR',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_ro_RO',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_ru_RU',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='description_zh_hans',
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True, verbose_name='brand description'),
field=models.TextField(blank=True, help_text='add a detailed description of the brand', null=True,
verbose_name='brand description'),
),
migrations.AddField(
model_name='brand',
name='small_logo',
field=models.ImageField(blank=True, help_text='upload a logo representing this brand', null=True, upload_to='brands/', validators=[core.validators.validate_category_image_dimensions], verbose_name='brand small image'),
field=models.ImageField(blank=True, help_text='upload a logo representing this brand', null=True,
upload_to='brands/',
validators=[core.validators.validate_category_image_dimensions],
verbose_name='brand small image'),
),
]

View file

@ -1,11 +1,11 @@
# Generated by Django 5.1.8 on 2025-05-06 13:58
import core.utils
from django.db import migrations, models
import core.utils
class Migration(migrations.Migration):
dependencies = [
('core', '0016_alter_product_slug'),
]
@ -14,6 +14,8 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='order',
name='human_readable_id',
field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=8, verbose_name='human readable id'),
field=models.CharField(default=core.utils.generate_human_readable_id,
help_text='a human-readable identifier for the order', max_length=8,
verbose_name='human readable id'),
),
]

View file

@ -1,7 +1,7 @@
from django.db import migrations, models
from django.db.models import Count
import core.utils
from django.db import migrations, models
def fix_duplicates(apps, schema_editor):
@ -26,8 +26,8 @@ def fix_duplicates(apps, schema_editor):
def reverse_func(apps, schema_editor):
pass
class Migration(migrations.Migration):
class Migration(migrations.Migration):
dependencies = [
('core', '0017_order_human_readable_id'),
]
@ -37,6 +37,8 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='order',
name='human_readable_id',
field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=8, unique=True, verbose_name='human readable id'),
field=models.CharField(default=core.utils.generate_human_readable_id,
help_text='a human-readable identifier for the order', max_length=8, unique=True,
verbose_name='human readable id'),
),
]

View file

@ -11,7 +11,7 @@ from celery.utils.log import get_task_logger
from constance import config
from django.core.cache import cache
from core.models import Product, ProductTag, Promotion
from core.models import Product, Promotion
from core.utils.caching import set_default_cache
from core.vendors import delete_stale
from evibes.settings import MEDIA_ROOT

View file

@ -62,7 +62,7 @@ The {CONSTANCE_CONFIG.get("PROJECT_NAME")[0]} B2B API is designed to provide sea
- Apply an `Accept-Language` header to use non-default language. A list of all languages is available at `/app/languages/`.
## Version
Current API version: 2.5.0
Current API version: 2.6.0
""" # noqa: E501
SPECTACULAR_PLATFORM_DESCRIPTION = f"""
@ -88,13 +88,13 @@ The {CONSTANCE_CONFIG.get("PROJECT_NAME")[0]} API is the central hub for managin
- Apply an `Accept-Language` header to use non-default language. A list of all languages is available at `/app/languages/`.
## Version
Current API version: 2.5.0
Current API version: 2.6.0
""" # noqa: E501, F405
SPECTACULAR_PLATFORM_SETTINGS = {
"TITLE": f"{CONSTANCE_CONFIG.get('PROJECT_NAME')[0]} API",
"DESCRIPTION": SPECTACULAR_PLATFORM_DESCRIPTION,
"VERSION": "2.5.0",
"VERSION": "2.6.0",
"TOS": "https://wiseless.xyz/evibes/terms-of-service",
"SWAGGER_UI_DIST": "SIDECAR",
"CAMELIZE_NAMES": True,
@ -106,7 +106,7 @@ SPECTACULAR_PLATFORM_SETTINGS = {
"ENABLE_DJANGO_DEPLOY_CHECK": not DEBUG, # noqa: F405
"SWAGGER_UI_FAVICON_HREF": r"/static/favicon.png",
"SWAGGER_UI_SETTINGS": {
"requestInterceptor": """
"requestInterceptor": """
function(request) {
const fmt = new URL(request.url).searchParams.get('format');
if (fmt) {
@ -127,7 +127,7 @@ SPECTACULAR_PLATFORM_SETTINGS = {
return request;
}
""",
},
},
"SERVERS": [
{
"url": f"https://api.{CONSTANCE_CONFIG.get('BASE_DOMAIN')[0]}/",
@ -145,7 +145,7 @@ SPECTACULAR_PLATFORM_SETTINGS = {
SPECTACULAR_B2B_SETTINGS = {
"TITLE": f"{CONSTANCE_CONFIG.get('PROJECT_NAME')[0]} API",
"DESCRIPTION": SPECTACULAR_B2B_DESCRIPTION,
"VERSION": "2.5.0",
"VERSION": "2.6.0",
"TOS": "https://wiseless.xyz/evibes/terms-of-service",
"SWAGGER_UI_DIST": "SIDECAR",
"CAMELIZE_NAMES": True,
@ -157,7 +157,7 @@ SPECTACULAR_B2B_SETTINGS = {
"ENABLE_DJANGO_DEPLOY_CHECK": not DEBUG, # noqa: F405
"SWAGGER_UI_FAVICON_HREF": r"/static/favicon.png",
"SWAGGER_UI_SETTINGS": {
"requestInterceptor": """
"requestInterceptor": """
function(request) {
const fmt = new URL(request.url).searchParams.get('format');
if (fmt) {
@ -178,7 +178,7 @@ SPECTACULAR_B2B_SETTINGS = {
return request;
}
""",
},
},
"SERVERS": [
{
"url": f"https://b2b.{CONSTANCE_CONFIG.get('BASE_DOMAIN')[0]}/",

View file

@ -1,12 +1,12 @@
# Generated by Django 5.1.5 on 2025-03-10 11:38
import django_extensions.db.fields
import uuid
import django_extensions.db.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
@ -16,10 +16,18 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Balance',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('amount', models.FloatField(default=0)),
],
options={
@ -30,10 +38,18 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Transaction',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True, help_text="if set to false, this object can't be seen by users without needed permission", verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('is_active', models.BooleanField(default=True,
help_text="if set to false, this object can't be seen by users without needed permission",
verbose_name='is active')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('amount', models.FloatField()),
('currency', models.CharField(max_length=3)),
('payment_method', models.CharField(max_length=20)),

2561
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "eVibes"
version = "2.5.0"
version = "2.6.0"
description = "eVibes is an open-source eCommerce backend service built with Django. Its designed for flexibility, making it ideal for various use cases and learning Django skills. The project is easy to customize, allowing for straightforward editing and extension."
authors = ["fureunoir <contact@fureunoir.com>"]
readme = "README.md"
@ -8,13 +8,13 @@ package-mode = false
[tool.poetry.dependencies]
python = ">=3.12,<3.13"
poetry-core = "2.1.2"
ruff = "0.11.5"
poetry-core = "2.1.3"
ruff = "0.11.8"
six = "1.17.0"
cryptography = "44.0.2"
redis = "5.2.1"
cryptography = "44.0.3"
redis = "6.0.0"
httpx = "0.28.1"
celery = { extras = ["flower"], version = "5.5.1", optional = true }
celery = { extras = ["flower"], version = "5.5.2", optional = true }
flower = "2.0.1"
pillow = "11.2.1"
south = "1.0.2"
@ -23,25 +23,25 @@ requests = "2.32.3"
gunicorn = "23.0.0"
psycopg2 = "2.9.10"
polib = "1.2.0"
openai = {version = "1.74.0", optional = true }
openai = { version = "1.77.0", optional = true }
swapper = "1.4.0"
filetype = "1.2.0"
colorlog = "6.9.0"
pymdown-extensions = "10.15"
sentry-sdk = { extras = ["django"], version = "2.26.1", optional = true }
sentry-sdk = { extras = ["django"], version = "2.27.0", optional = true }
jupyter = { version = "1.1.1", optional = true }
elasticsearch-dsl = "8.18.0"
django = "5.1.8"
django = "5.2"
django-extensions = "4.1"
graphene-django = "3.2.3"
django-redis = "5.4.0"
django-modeltranslation = "0.19.13"
django-modeltranslation = "0.19.14"
django-ratelimit = "4.1.0"
django-hosts = "6.0"
django-mptt = "0.17.0"
django-filter = "25.1"
django-constance = "4.3.2"
django-daisy = "1.0.19"
django-daisy = "1.0.23"
django-cacheops = "7.2"
django-mailbox = "4.10.1"
django-model-utils = "5.0.0"

View file

@ -1,17 +1,18 @@
# Generated by Django 5.1.5 on 2025-03-10 11:56
import uuid
import django.contrib.auth.models
import django.utils.timezone
import django_extensions.db.fields
import uuid
from django.db import migrations, models
import vibes_auth.managers
import vibes_auth.models
import vibes_auth.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
@ -41,26 +42,57 @@ class Migration(migrations.Migration):
fields=[
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_superuser', models.BooleanField(default=False,
help_text='Designates that this user has all permissions without explicitly assigning them.',
verbose_name='superuser status')),
('is_staff', models.BooleanField(default=False,
help_text='Designates whether the user can log into this admin site.',
verbose_name='staff status')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='unique id is used to surely identify any database object', primary_key=True, serialize=False, verbose_name='unique id')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, help_text='when the object first appeared on the database', verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='when the object was last modified', verbose_name='modified')),
('email', models.EmailField(help_text='user email address', max_length=254, unique=True, verbose_name='email')),
('phone_number', models.CharField(blank=True, help_text='user phone number', max_length=20, null=True, unique=True, validators=[vibes_auth.validators.validate_phone_number], verbose_name='phone_number')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('email',
models.EmailField(help_text='user email address', max_length=254, unique=True, verbose_name='email')),
('phone_number',
models.CharField(blank=True, help_text='user phone number', max_length=20, null=True, unique=True,
validators=[vibes_auth.validators.validate_phone_number],
verbose_name='phone_number')),
('first_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='first_name')),
('last_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='last_name')),
('avatar', models.ImageField(blank=True, help_text='user profile image', null=True, upload_to=vibes_auth.models.User.get_uuid_as_path, verbose_name='avatar')),
('is_verified', models.BooleanField(default=False, help_text='user verification status', verbose_name='is verified')),
('is_active', models.BooleanField(default=False, help_text='unselect this instead of deleting accounts', verbose_name='is_active')),
('is_subscribed', models.BooleanField(default=False, help_text="user's newsletter subscription status", verbose_name='is_subscribed')),
('avatar', models.ImageField(blank=True, help_text='user profile image', null=True,
upload_to=vibes_auth.models.User.get_uuid_as_path, verbose_name='avatar')),
('is_verified',
models.BooleanField(default=False, help_text='user verification status', verbose_name='is verified')),
('is_active', models.BooleanField(default=False, help_text='unselect this instead of deleting accounts',
verbose_name='is_active')),
('is_subscribed', models.BooleanField(default=False, help_text="user's newsletter subscription status",
verbose_name='is_subscribed')),
('activation_token', models.UUIDField(default=uuid.uuid4, verbose_name='activation token')),
('language', models.CharField(choices=[('en-GB', 'English (British)'), ('ar-AR', 'العربية'), ('cs-CZ', 'Česky'), ('da-DK', 'Dansk'), ('de-DE', 'Deutsch'), ('en-US', 'English (American)'), ('es-ES', 'Español'), ('fr-FR', 'Français'), ('hi-IN', 'हिंदी'), ('it-IT', 'Italiano'), ('ja-JP', '日本語'), ('kk-KZ', 'Қазақ'), ('nl-NL', 'Nederlands'), ('pl-PL', 'Polska'), ('pt-BR', 'Português'), ('ro-RO', 'Română'), ('ru-RU', 'Русский'), ('zh-hans', '简体中文')], default='en-GB', max_length=7)),
('language', models.CharField(
choices=[('en-GB', 'English (British)'), ('ar-AR', 'العربية'), ('cs-CZ', 'Česky'),
('da-DK', 'Dansk'), ('de-DE', 'Deutsch'), ('en-US', 'English (American)'),
('es-ES', 'Español'), ('fr-FR', 'Français'), ('hi-IN', 'हिंदी'), ('it-IT', 'Italiano'),
('ja-JP', '日本語'), ('kk-KZ', 'Қазақ'), ('nl-NL', 'Nederlands'), ('pl-PL', 'Polska'),
('pt-BR', 'Português'), ('ro-RO', 'Română'), ('ru-RU', 'Русский'),
('zh-hans', '简体中文')], default='en-GB', max_length=7)),
('attributes', models.JSONField(blank=True, default=dict, null=True, verbose_name='attributes')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('recently_viewed', models.ManyToManyField(blank=True, help_text='recently viewed products', to='core.product', verbose_name='recently viwed')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
('groups', models.ManyToManyField(blank=True,
help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
related_name='user_set', related_query_name='user', to='auth.group',
verbose_name='groups')),
('recently_viewed',
models.ManyToManyField(blank=True, help_text='recently viewed products', to='core.product',
verbose_name='recently viwed')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.',
related_name='user_set', related_query_name='user',
to='auth.permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'user',