Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit f809469

Browse files
committed
style: Format api module
Format Python code with autopep8 to conform to the PEP 8 style guide.
1 parent e19431e commit f809469

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

api/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
class ProductSerializer(serializers.ModelSerializer):
77
class Meta:
88
model = Product
9-
fields = '__all__'
9+
fields = '__all__'

api/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from . import views
44

55

6-
API_VERSION ='api/v1/'
6+
API_VERSION = 'api/v1/'
77

88
urlpatterns = [
99
path('products/', views.get_all_products, name='products'),

api/views.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
# ----------------------------API Endpoints---------------------------- #
1212

1313

14-
1514
# ----------------------------Products---------------------------- #
1615

1716

1817
@api_view(['GET'])
1918
def get_all_products(request):
20-
"""
19+
"""
2120
app: product
2221
resource: Product
2322
methods: GET
@@ -27,5 +26,3 @@ def get_all_products(request):
2726
products = Product.objects.all().order_by('title')
2827
serializer = ProductSerializer(products, many=True)
2928
return Response(serializer.data)
30-
31-

0 commit comments

Comments
 (0)