#python #django #django-rest-framework
Вопрос:
Следующий код выдает мне ошибку при запуске (http://127.0.0.1:8000/docs/):
from django.contrib import admin
from django.urls import path, include
from rest_framework.schemas import get_schema_view
from rest_framework.documentation import include_docs_urls
schema_view = get_schema_view(title='Blog API')
urlpatterns = [
path('admin/', admin.site.urls),
path('api/v1/', include('posts.urls')),
path('api-auth/', include('rest_framework.urls')), # Peculiar to rest_framework
path('api/v1/rest-auth/', include('rest_auth.urls')), # Peculiar to django-rest-auth package
path('api/v1/rest-auth/registration/', include('rest_auth.registration.urls')), # Peculiar to rest_auth app
path('docs/', include_docs_urls(title='Blog API')),
path('schema/', schema_view),
]
Вот в чем ошибка:
AttributeError: 'AutoSchema' object has no attribute 'get_link'
Пожалуйста, помогите предложить потенциальное решение