"""server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/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,include,re_path
from django.conf.urls.static import static
import server.settings as settings
from rest_framework_jwt.views import obtain_jwt_token,refresh_jwt_token,verify_jwt_token
from rest_framework.documentation import include_docs_urls
from rbac.views.user import UserLogoutView
from utils.file import UploadFileView
from utils.view import redirect

urlpatterns = [
    path('rbac/', include('rbac.urls')),
    path('vod/', include('vod.urls')),
    path('develop/', include('develop.urls')),
    path('crm/', include('crm.urls')),
    path('question/', include('question.urls')),
    path('examtest/', include('examtest.urls')),
    path('cms/', include('cms.urls')),
    path('analyse/', include('analyse.urls')),
    path('qtest/', include('qtest.urls')),
    path('token/', obtain_jwt_token),
    path('token/refresh/', refresh_jwt_token),
    path('token/verify/', verify_jwt_token),
    path('token/remove/', UserLogoutView.as_view()),
    path('uploadfile/', UploadFileView.as_view()),
    path('redirect/',redirect),
    path('admin/', admin.site.urls),
    path('docs/', include_docs_urls(title="答题平台接口文档",authentication_classes=[], permission_classes=[])),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
