농장/Django

[Django] url 404 에러 해결하기

귤발자 2020. 11. 27. 00:29
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
반응형