restore composer.json, add mysqli extension
This commit is contained in:
15
core/apps/vendors/views/Attribute.py
vendored
Normal file
15
core/apps/vendors/views/Attribute.py
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
from rest_framework import viewsets, permissions
|
||||
from core.apps.vendors.models import ProductAttributeModel
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
class ProductAttributeSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = ProductAttributeModel
|
||||
fields = ["id", "firestore_id", "name"]
|
||||
|
||||
|
||||
class ProductAttributeView(viewsets.ReadOnlyModelViewSet):
|
||||
queryset = ProductAttributeModel.objects.all()
|
||||
serializer_class = ProductAttributeSerializer
|
||||
permission_classes = [permissions.AllowAny]
|
||||
1
core/apps/vendors/views/__init__.py
vendored
1
core/apps/vendors/views/__init__.py
vendored
@@ -2,3 +2,4 @@ from .category import * # noqa
|
||||
from .vendor import * # noqa
|
||||
from .vendor_product import * # noqa
|
||||
from .section import * # noqa
|
||||
from .Attribute import * # noqa
|
||||
|
||||
Reference in New Issue
Block a user