質問編集履歴
1
情報の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,74 +2,6 @@
|
|
2
2
|
|
3
3
|
app/index.html や index.html とエラーが出ます。
|
4
4
|
|
5
|
-
testapp(親アプリ)の中にappという子アプリがあって、
|
6
|
-
|
7
|
-
その中にindex.html・urls.py・views.py があります。
|
8
|
-
|
9
|
-
appのurls.pyには
|
10
|
-
|
11
|
-
```ここに言語を入力
|
12
|
-
|
13
|
-
from django.conf.urls import url
|
14
|
-
|
15
|
-
from . import views
|
16
5
|
|
17
6
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
urlpatterns = [
|
22
|
-
|
23
|
-
url(r'^$', views.index, name='index'),
|
24
|
-
|
25
|
-
]
|
26
|
-
|
27
|
-
```
|
28
|
-
|
29
|
-
と書き、
|
30
|
-
|
31
|
-
appのviews.pyには
|
32
|
-
|
33
|
-
```ここに言語を入力
|
34
|
-
|
35
|
-
from django.shortcuts import render
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
def index(request):
|
42
|
-
|
43
|
-
return render(request, 'app/index.html')
|
44
|
-
|
45
|
-
```
|
46
|
-
|
47
|
-
と書き、
|
48
|
-
|
49
|
-
testappのurls.pyには
|
50
|
-
|
51
|
-
```ここに言語を入力
|
52
|
-
|
53
|
-
from django.conf.urls import include, url
|
54
|
-
|
55
|
-
from django.contrib import admin
|
56
|
-
|
57
|
-
from app.views import index
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
urlpatterns = [
|
62
|
-
|
63
|
-
url(r'^admin/', include(admin.site.urls)),
|
64
|
-
|
65
|
-
url(r'^$', index, name='index'),
|
66
|
-
|
67
|
-
]
|
68
|
-
|
69
|
-
```
|
70
|
-
|
71
|
-
と書きました。
|
72
|
-
|
73
|
-
appのviews.pyのrenderの引数を'index.html'にしたのですがそれでも同じエラーが出ました。
|
74
|
-
|
75
7
|
何が問題なのでしょうか?
|