본문 바로가기
studies/Back-end

[Django] url 404 에러 해결하기

by mjkcool 2020. 11. 27.
728x90
반응형

Page not found (404)

Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

The empty path didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

 

에러 문구이다.

 

 

해결:

urlpatterns = [
    # (r'^dramarama/', include('dramarama.urls')),
    path('admin/', admin.site.urls),
    path('', include('dramarama.urls')),
]
urlpatterns = [
    path('', views.index, name='index'),
]

진이 쏙 빠진다.. 몇시간을 해맸다.

같은 코드인데 되다 안됬다가...

728x90
반응형