回答編集履歴

6

追記

2024/08/07 03:05

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -10,4 +10,18 @@
10
10
 
11
11
  `account/profile_edit.html` もしくは `allauth/account/profile_edit.html` では?
12
12
  (コードには account **s** /profile_edit.html と書いてあります)
13
- (もしくディレクトリ名を accounts にするか)
13
+ (もしくディレクトリ名を accounts にするか)
14
+
15
+
16
+ ---
17
+ (追記)
18
+ accounts がアプリケーションとして追加されているようなので
19
+ ```
20
+ Project
21
+ |-accounts
22
+ |-templates
23
+ |-accounts
24
+ |-profile_edit.html
25
+ ```
26
+ の位置に置くのが自然なのではないでしょうか?
27
+ (コードは今の`render(request, 'accounts/profile_edit.html', 略)`のまま)

5

追記

2024/08/06 08:32

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  `account/profile_edit.html` もしくは `allauth/account/profile_edit.html` では?
12
12
  (コードには account **s** /profile_edit.html と書いてあります)
13
+ (もしくばディレクトリ名を accounts にするか)

4

誤記でした

2024/08/06 08:24

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -8,5 +8,5 @@
8
8
  ```
9
9
  で、`Project/templates`と`Project/templates/allauth`をsettings.pyのTEMPLATESに入れているならテンプレートの名前は
10
10
 
11
- `account/profile.html` もしくは `allauth/account/profile.html` では?
11
+ `account/profile_edit.html` もしくは `allauth/account/profile_edit.html` では?
12
- (コードには account **s** /profile.html と書いてあります)
12
+ (コードには account **s** /profile_edit.html と書いてあります)

3

更新

2024/08/06 08:23

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -1,4 +1,4 @@
1
- ~~ファイル配置が~~
1
+ ファイル配置が
2
2
  ```
3
3
  Project
4
4
  |-templates
@@ -6,10 +6,7 @@
6
6
  |-account
7
7
  |-profile_edit.html
8
8
  ```
9
- ~~で、`Project/templates`をsettings.pyのTEMPLATESに入れているならテンプレートの名前は~~
9
+ で、`Project/templates`と`Project/templates/allauth`をsettings.pyのTEMPLATESに入れているならテンプレートの名前は
10
- ```
11
- return render(request, 'allauth/accounts/profile.html')
12
- ```
13
- ~~では?~~
14
10
 
15
- 質問文中で言及されてないので気付かなかったのですが、TEMPLATESに`os.path.join(BASE_DIR, 'templates', 'allauth')`がありますね……
11
+ `account/profile.html` もしくは `allauth/account/profile.html` では?
12
+ (コードには account **s** /profile.html と書いてあります)

2

些細

2024/08/06 08:02

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -12,4 +12,4 @@
12
12
  ```
13
13
  ~~では?~~
14
14
 
15
- 言及てないので気付かなかったのですが、TEMPLATESに`os.path.join(BASE_DIR, 'templates', 'allauth')`がありますね……
15
+ 質問文中で言及されてないので気付かなかったのですが、TEMPLATESに`os.path.join(BASE_DIR, 'templates', 'allauth')`がありますね……

1

見落としました

2024/08/06 07:59

投稿

quickquip
quickquip

スコア11187

test CHANGED
@@ -1,4 +1,4 @@
1
- ファイル配置が
1
+ ~~ファイル配置が~~
2
2
  ```
3
3
  Project
4
4
  |-templates
@@ -6,8 +6,10 @@
6
6
  |-account
7
7
  |-profile_edit.html
8
8
  ```
9
- で、`Project/templates`をsettings.pyのtemplatesに入れているならテンプレートの名前は
9
+ ~~で、`Project/templates`をsettings.pyのTEMPLATESに入れているならテンプレートの名前は~~
10
10
  ```
11
11
  return render(request, 'allauth/accounts/profile.html')
12
12
  ```
13
- では?
13
+ ~~では?~~
14
+
15
+ 言及してないので気付かなかったのですが、TEMPLATESに`os.path.join(BASE_DIR, 'templates', 'allauth')`がありますね……