enabled swagger

This commit is contained in:
DJ Gillespie 2021-12-30 17:22:22 -07:00
parent 7180742492
commit 7a79251a52
2 changed files with 8 additions and 3 deletions

View File

@ -48,6 +48,7 @@ INSTALLED_APPS = [
'corsheaders',
'rest_framework_simplejwt.token_blacklist',
'django_filters',
'rest_framework_swagger',
]
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
@ -107,7 +108,8 @@ REST_FRAMEWORK = {
],
'DEFAULT_FILTER_BACKENDS': (
'django_filters.rest_framework.DjangoFilterBackend',
)
),
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
}
REST_USE_JWT = True
@ -151,7 +153,7 @@ USE_TZ = False
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True

View File

@ -35,7 +35,9 @@ from qrtr_account.views import (AccountViewSet,
TwitterLogin)
from connection.views import ConnectionViewSet, ConnectionTypeViewSet
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title="Qrtr API")
router = routers.DefaultRouter()
router.register(r'users', UserViewSet)
@ -65,6 +67,7 @@ apipatterns = [
urlpatterns = [
path('admin/', admin.site.urls),
path('api/v1/', include(apipatterns), name='api'),
path('api/v1/docs', schema_view),
path('accounts/', include('allauth.urls')),
path('accounts/profile/', ConfirmEmailSuccessView.as_view()),
]