#やりたいこと
hoge.com/templates/index.html hoge.com/templates/no2.htmlというURLで表示させたい。
#エラー index.html
Page not found (404) Request Method: GET Request URL: http://xxx.xxx/templates/index.html Using the URLconf defined in project.urls, Django tried these URL patterns, in this order: admin/ [name='index'] The current path, templates/index.html, 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. #urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('templates/', include('static_sites.urls')),
]
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/08/16 11:05
退会済みユーザー
2019/08/17 00:47
2019/08/17 01:15
退会済みユーザー
2019/08/17 01:40 編集
2019/08/17 02:07
退会済みユーザー
2019/08/17 02:16