-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83b24fe
commit 6af19bd
Showing
51 changed files
with
8,370 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ venv/ | |
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
*/.venv | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,38 @@ | |
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | ||
""" | ||
from django.contrib import admin | ||
from django.urls import path | ||
from django.urls import include, path | ||
from rest_framework import routers, permissions | ||
|
||
from drf_yasg.views import get_schema_view | ||
from drf_yasg import openapi | ||
|
||
|
||
from user import views | ||
|
||
schema_view = get_schema_view( | ||
openapi.Info( | ||
title="My Project API", | ||
default_version="v1", | ||
|
||
description="API documentation for My Project", | ||
terms_of_service="https://www.example.com/terms/", | ||
contact=openapi.Contact(email="[email protected]"), license=openapi.License(name="BSD License"), | ||
), | ||
public=True, | ||
permission_classes=(permissions.AllowAny,), | ||
) | ||
|
||
|
||
router = routers.DefaultRouter() | ||
router.register(r'users', views.UserViewSet) | ||
|
||
urlpatterns = [ | ||
path('api/', include(router.urls)), | ||
path('admin/', admin.site.urls), | ||
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), | ||
path('docs/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), | ||
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), | ||
] | ||
|
||
# urlpatterns += router.urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from rest_framework.decorators import api_view, permission_classes | ||
from rest_framework.permissions import AllowAny | ||
from rest_framework.response import Response | ||
|
||
|
||
@api_view(['GET', 'POST']) | ||
@permission_classes([AllowAny]) | ||
def hello_rest_api(request): | ||
data = {'message': 'Hello REST API'} | ||
return Response(data) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
Django==4.2.9 | ||
psycopg2==2.9.3 | ||
psycopg2==2.9.3 | ||
djangorestframework==3.14.0 | ||
djangorestframework-simplejwt==5.3.1 | ||
django-rest-framework-docs==0.1.7 | ||
drf-yasg==1.21.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Information about external resources | ||
|
||
The following files are taken from external resources or trees. | ||
|
||
Files: insQ.js | ||
insQ.min.js | ||
License: MIT | ||
Copyright: Zbyszek Tenerowicz | ||
Eryk Napierała <[email protected]> | ||
Askar Yusupov <[email protected]> | ||
Dan Dascalescu <[email protected]> | ||
Source: https://github.com/naugtur/insertionQuery v1.0.3 | ||
|
||
Files: immutable.js | ||
immutable.min.js | ||
License: MIT | ||
Copyright: 2014-present, Facebook, Inc | ||
Source: https://github.com/immutable-js/immutable-js/releases/tag/v3.8.2 |
Oops, something went wrong.