-
Notifications
You must be signed in to change notification settings - Fork 2
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
ca61c49
commit 048fb9e
Showing
3 changed files
with
113 additions
and
27 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
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,21 +1,26 @@ | ||
"""ideaconcert URL Configuration | ||
from drf_yasg import openapi | ||
from drf_yasg.views import get_schema_view | ||
|
||
The `urlpatterns` list routes URLs to views. For more information please see: | ||
https://docs.djangoproject.com/en/3.2/topics/http/urls/ | ||
Examples: | ||
Function views | ||
1. Add an import: from my_app import views | ||
2. Add a URL to urlpatterns: path('', views.home, name='home') | ||
Class-based views | ||
1. Add an import: from other_app.views import Home | ||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') | ||
Including another URLconf | ||
1. Import the include() function: from django.urls import include, path | ||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | ||
""" | ||
from django.contrib import admin | ||
from django.urls import path | ||
from rest_framework import permissions | ||
from django.urls import path, re_path, include | ||
|
||
|
||
schema_view = get_schema_view( | ||
openapi.Info( | ||
title='ideaconcert API', | ||
default_version='v1', | ||
description='ideaconcert-project', | ||
), | ||
public=True, | ||
permission_classes=(permissions.AllowAny,), | ||
) | ||
|
||
urlpatterns = [ | ||
path('admin/', admin.site.urls), | ||
|
||
] | ||
|
||
urlpatterns += [ | ||
re_path(r'^swagger(?P<format>\.json|\.yaml)$',schema_view.without_ui(cache_timeout=0),name='schema-json',), | ||
re_path(r'^swagger$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), | ||
re_path(r'^redoc$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), | ||
] |
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,7 @@ | ||
Django==4.0.6 | ||
djangorestframework==3.13.1 | ||
django-cors-headers==3.13.0 | ||
django-extensions==3.2.0 | ||
ipython==8.4.0 | ||
python-dotenv==0.20.0 | ||
drf-yasg==1.20.0 |