質問編集履歴

1

追記

2018/06/10 01:54

投稿

mbase
mbase

スコア17

test CHANGED
@@ -1 +1 @@
1
- DjangoをAWSにデプロイするとTemplateDoesNotExist at エラーが出てしまう
1
+ DjangoをAWS(EB)にデプロイするとTemplateDoesNotExist at エラーが出てしまう
test CHANGED
@@ -29,3 +29,33 @@
29
29
 
30
30
 
31
31
  おわかりでしたら教えてください。よろしくお願い致します。
32
+
33
+
34
+
35
+ 追記:
36
+
37
+
38
+
39
+ 英語の記事(https://forums.aws.amazon.com/thread.jspa?threadID=115677)ですが、以下のようなことが書いてありました。
40
+
41
+
42
+
43
+ > I suppose you want to upload your django local version to aws EB, right?In that case you need to change your template path to:
44
+
45
+
46
+
47
+ > os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'template'),
48
+
49
+ you need this code at the begining of your seetins.py
50
+
51
+
52
+
53
+ > import os
54
+
55
+ > right now I see you have:
56
+
57
+ > /home/yiwei/testsite/mysite/fyt/view
58
+
59
+
60
+
61
+ EBにデプロイするなら、template pathを変えなさいと言っているんだと思うのですが、イマイチわかりません。。