vistas iniciales en las tablas
This commit is contained in:
@@ -6,4 +6,10 @@ Lista de la compra
|
||||
|
||||
### Proceso
|
||||
|
||||
- ([Build And Deploy A REST API With Django REST Framework. Full Project Tutorial. - YouTube 00:26:15](https://youtu.be/Sjv-HTLmnB4))
|
||||
##### Commit 1
|
||||
|
||||
- [Build And Deploy A REST API With Django REST Framework. Full Project Tutorial. - YouTube 00:26:15](https://youtu.be/Sjv-HTLmnB4)
|
||||
|
||||
#### Commit 2
|
||||
|
||||
- 00:29:00
|
||||
|
||||
6
comparte/urls.py
Normal file
6
comparte/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.HelloComparteView.as_view(), name='hello_comparte'),
|
||||
]
|
||||
@@ -1,3 +1,12 @@
|
||||
from django.shortcuts import render
|
||||
# from django.shortcuts import render
|
||||
from rest_framework import generics, status
|
||||
from rest_framework.response import Response
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
class HelloComparteView(generics.GenericAPIView):
|
||||
|
||||
def get(self, request):
|
||||
return Response(data={"message": "Hello Comparte"},
|
||||
status=status.HTTP_200_OK)
|
||||
|
||||
6
compra/urls.py
Normal file
6
compra/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.HelloCompraView.as_view(), name='hello_compra'),
|
||||
]
|
||||
@@ -1,3 +1,12 @@
|
||||
from django.shortcuts import render
|
||||
# from django.shortcuts import render
|
||||
from rest_framework import generics, status
|
||||
from rest_framework.response import Response
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
class HelloCompraView(generics.GenericAPIView):
|
||||
|
||||
def get(self, request):
|
||||
return Response(data={"message": "Hello Compra"},
|
||||
status=status.HTTP_200_OK)
|
||||
|
||||
6
item/urls.py
Normal file
6
item/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.HelloItemView.as_view(), name='hello_item'),
|
||||
]
|
||||
@@ -1,3 +1,12 @@
|
||||
from django.shortcuts import render
|
||||
# from django.shortcuts import render
|
||||
from rest_framework import generics, status
|
||||
from rest_framework.response import Response
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
class HelloItemView(generics.GenericAPIView):
|
||||
|
||||
def get(self, request):
|
||||
return Response(data={"message": "Hello Item"},
|
||||
status=status.HTTP_200_OK)
|
||||
|
||||
6
lista/urls.py
Normal file
6
lista/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.HelloListaView.as_view(), name='hello_lista'),
|
||||
]
|
||||
@@ -1,3 +1,12 @@
|
||||
from django.shortcuts import render
|
||||
# from django.shortcuts import render
|
||||
from rest_framework import generics, status
|
||||
from rest_framework.response import Response
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
class HelloListaView(generics.GenericAPIView):
|
||||
|
||||
def get(self, request):
|
||||
return Response(data={"message": "Hello Lista"},
|
||||
status=status.HTTP_200_OK)
|
||||
|
||||
@@ -3,5 +3,9 @@ from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('auth/', include('authentication.urls'))
|
||||
path('auth/', include('authentication.urls')),
|
||||
path('comparte/', include('comparte.urls')),
|
||||
path('compra/', include('compra.urls')),
|
||||
path('item/', include('item.urls')),
|
||||
path('lista/', include('lista.urls')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user