Skip to content

Commit

Permalink
chore(documentation): modify files to accomodate documentation
Browse files Browse the repository at this point in the history
- enable a parameter field for the available endpoints

[Delivers #161966603]
  • Loading branch information
salma-nyagaka committed Nov 29, 2018
1 parent 209b266 commit a27e295
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 179 deletions.
6 changes: 3 additions & 3 deletions authors/apps/authentication/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework import status
from rest_framework.generics import RetrieveUpdateAPIView
from rest_framework.generics import RetrieveUpdateAPIView, CreateAPIView
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
Expand All @@ -10,7 +10,7 @@
)


class RegistrationAPIView(APIView):
class RegistrationAPIView(CreateAPIView):
# Allow any user (authenticated or not) to hit this endpoint.
permission_classes = (AllowAny,)
renderer_classes = (UserJSONRenderer,)
Expand All @@ -29,7 +29,7 @@ def post(self, request):
return Response(serializer.data, status=status.HTTP_201_CREATED)


class LoginAPIView(APIView):
class LoginAPIView(CreateAPIView):
permission_classes = (AllowAny,)
renderer_classes = (UserJSONRenderer,)
serializer_class = LoginSerializer
Expand Down
146 changes: 0 additions & 146 deletions authors/settings 2.py

This file was deleted.

27 changes: 0 additions & 27 deletions authors/urls 2.py

This file was deleted.

5 changes: 2 additions & 3 deletions authors/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
"""
from django.urls import include, path
from django.contrib import admin
from rest_framework.schemas import get_schema_view
from rest_framework_swagger.renderers import SwaggerUIRenderer, OpenAPIRenderer
from rest_framework_swagger.views import get_swagger_view

schema_view = get_schema_view(title='AUTHORS HAVEN API', renderer_classes=[OpenAPIRenderer, SwaggerUIRenderer])
schema_view = get_swagger_view(title='AUTHORS HAVEN API')

urlpatterns = [
path('admin/', admin.site.urls),
Expand Down

0 comments on commit a27e295

Please sign in to comment.