Skip to content

Commit 8e7a47e

Browse files
author
Deva Jayantha
committed
hperlink url
1 parent 1f4f282 commit 8e7a47e

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed
21 Bytes
Binary file not shown.

home/__pycache__/urls.cpython-36.pyc

2 Bytes
Binary file not shown.

home/serializers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from .models import Inventory
33

44

5-
class InventorySerializers(serializers.ModelSerializer):
5+
class InventorySerializers(serializers.HyperlinkedModelSerializer):
66
class Meta:
77
model = Inventory
8-
fields = ('id','name','paradigma')
8+
fields = ('id','url','name','paradigma')

home/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
router.register('inventory', views.InventoryView)
77

88
urlpatterns = [
9-
path('', include(router.urls))
9+
path('home/', include(router.urls))
1010
]

0 commit comments

Comments
 (0)