TypeError: _path() got an unexpected keyword argument 'namespace'

created at 07-31-2021 views: 2

Editing the url.py file of the project (sutdentsite) prompts the following error: TypeError: _path() got an unexpected keyword argument'namespace'

Error meaning: The function has no namespace parameter

wrong code:

urlpatterns = [
    path('admin/', admin.site.urls),
    path('student/', include('student.urls'), namespace='studentform'),
]

solution

urlpatterns = [
    path('admin/', admin.site.urls),
    path('student/', include('student.urls', namespace='studentform')),
]
Please log in to leave a comment.