django2.2 에서, 하나의 프로젝트에 여러개의 app을 들어서 app을 실행했을때 아래와같은 경고가 발생하는 경우,
WARNINGS: ?: (urls.W002) Your URL pattern '/catsel/' [name='select'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'. System check identified 1 issue (0 silenced).
1. app의 urls.py(app의 이름이 devmgmt 이다)
urlpatterns = [ path('/catsel/', SelectCatView.as_view(), name='select'), path('/test/', TestView.as_view(), name='test'), # 테스트페이지 ]
위의 경고대로 아래처럼 path에서 ‘/’를 제거하고 접속했는데, 404 page not found 오류가 난다.
urlpatterns = [ path('catsel/', SelectCatView.as_view(), name='select'), path('test/', TestView.as_view(), name='test'), # 테스트페이지 ]