PyObject_GenericSetattr
我的IDE在from django.urls import path, re_path
from . import views
app_name="home-app"
urlpatterns = [
path('nueva-url', IndexView.views(), name='index')#this synthesis does not work, it gives me an error.
]
下画一条红线,如下所示:
答案 0 :(得分:2)
更改您的进口声明:
from .views import IndexView
urlpatterns = [
path('nueva-url', IndexView.as_view(), name='index')
]