categorylanri import qilish qoshildi
This commit is contained in:
2
core/apps/api/translation/__init__.py
Normal file
2
core/apps/api/translation/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from .category import * # noqa
|
||||
from .products import * # noqa
|
||||
13
core/apps/api/translation/category.py
Normal file
13
core/apps/api/translation/category.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from modeltranslation.translator import TranslationOptions, register
|
||||
|
||||
from core.apps.api.models import CategoryModel, SubcategoryModel
|
||||
|
||||
|
||||
@register(CategoryModel)
|
||||
class CategoryTranslation(TranslationOptions):
|
||||
fields = []
|
||||
|
||||
|
||||
@register(SubcategoryModel)
|
||||
class SubcategoryTranslation(TranslationOptions):
|
||||
fields = []
|
||||
8
core/apps/api/translation/products.py
Normal file
8
core/apps/api/translation/products.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from modeltranslation.translator import TranslationOptions, register
|
||||
|
||||
from core.apps.api.models import ProductsModel
|
||||
|
||||
|
||||
@register(ProductsModel)
|
||||
class ProductsTranslation(TranslationOptions):
|
||||
fields = []
|
||||
Reference in New Issue
Block a user