|
@ -40,7 +40,7 @@ schema_view = get_schema_view( |
|
|
permission_classes=(permissions.AllowAny,), |
|
|
permission_classes=(permissions.AllowAny,), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
urlpatterns_api = [ |
|
|
urlpatterns_api_doc = [ |
|
|
url(r'^docs/swagger(?P<format>\.json|\.yaml)$', |
|
|
url(r'^docs/swagger(?P<format>\.json|\.yaml)$', |
|
|
schema_view.without_ui(cache_timeout=0), name='schema-json'), |
|
|
schema_view.without_ui(cache_timeout=0), name='schema-json'), |
|
|
url(r'^docs/swagger/$', |
|
|
url(r'^docs/swagger/$', |
|
@ -60,13 +60,16 @@ deprecated_urlpatterns_api = [ |
|
|
|
|
|
|
|
|
url(r'^model/(?P<content_type>\d+)/(?P<pk>\d*)$', |
|
|
url(r'^model/(?P<content_type>\d+)/(?P<pk>\d*)$', |
|
|
ModelChoiceView.as_view(), name='model_list'), |
|
|
ModelChoiceView.as_view(), name='model_list'), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
urlpatterns = [ |
|
|
urlpatterns = [ |
|
|
url(r'^api/', include(deprecated_urlpatterns_api)), |
|
|
url(r'^api/', include(deprecated_urlpatterns_api)), |
|
|
url(r'^api/', include(urlpatterns_api)), |
|
|
url(r'^api/', include(urlpatterns_api_doc)), |
|
|
url(r'^api/', include(urlpatterns_router)), |
|
|
url(r'^api/', include(urlpatterns_router)), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# implementar caminho para autenticação |
|
|
# implementar caminho para autenticação |
|
|
# https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ |
|
|
# https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ |
|
|
# url(r'^api/auth/', include('rest_framework.urls', namespace='rest_framework')), |
|
|
# url(r'^api/auth/', include('rest_framework.urls', namespace='rest_framework')), |
|
|