Skip to content
Permalink
Browse files
Complete adding django rest framework example code
  • Loading branch information
Gary Martin committed Oct 14, 2018
1 parent d3dc9d9 commit 73249fa33262a0a3cf53dd8481e51fe58f43bd2a
Showing 3 changed files with 3 additions and 1 deletion.
@@ -59,6 +59,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
]

MIDDLEWARE = [
@@ -20,4 +20,5 @@

urlpatterns = [
path('', views.home, name='home'),
path('ticket', views.TicketList.as_view()),
]
@@ -27,6 +27,6 @@ def home(request):
from trackers.models import Ticket


class PlanetList(generics.ListCreateAPIView):
class TicketList(generics.ListCreateAPIView):
queryset = Ticket.objects.all()
serializer_class = TicketSerializer

0 comments on commit 73249fa

Please sign in to comment.