错误: 从django.conf.urls导入url时出错 ImportError: 无法从'django.conf.urls'中导入名称'url'
- 版本信息 Django==4.0.1 django-rest-auth==0.9.5
Pl help me.Thank you in advance
url.py
# Core Django imports
from django.contrib import admin
from django.urls import path, include
from django.urls import re_path,include
# from django.conf.urls import url,include
from django.conf import settings
# Rest framework imports
from rest_framework import permissions
# Simple JWT imports
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
schema_view = get_schema_view(
openapi.Info(
title="Heathy Living Guide API",
default_version='v1',
description="Heathy Living Guide",
),
public=True,
permission_classes=(permissions.AllowAny,),
)
urlpatterns = (
path('admin/', admin.site.urls),
path('api/authentication/', include('apps.authentication.urls'),authentication'),
path('api/users/', include('apps.users.urls'), name='users'),
path('rest-auth/', include('rest_auth.urls')),
# re_path(r'^rest-auth/', include('rest_auth.urls'))
)
urlpatterns += [
path('api/swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('api/redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc')
]