Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.
在url.py
中修改為:
from django.urls import path, include
path("", include(("app名稱.urls", "app名稱"), namespace="別名")),