teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

6

a

2020/09/28 02:06

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -4,7 +4,7 @@
4
4
  python manage.py runserverを実行すると "Page not found" とエラーが吐かれました。
5
5
 
6
6
  urls.py関連でエラーが吐かれているのではないかと思っています。。
7
- 原因と解決を知りてたいです。よろしくお願いします
7
+ 原因と解決を知りてたいです。よろしくお願いします
8
8
 
9
9
  環境:python, mac catalina
10
10
 

5

code

2020/09/28 02:06

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -34,4 +34,17 @@
34
34
  ]
35
35
 
36
36
  ]
37
+ ```
38
+
39
+ ↓cms/urls.py
40
+ ```python
41
+ from django.urls import path
42
+ from cms import views
43
+
44
+ app_name = 'cms'
45
+ urlpatterns = [
46
+ # 書籍
47
+ path('book/', views.book_list, name='book_list'), # 一覧
48
+ ]
49
+
37
50
  ```

4

っf

2020/09/28 02:05

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -13,7 +13,7 @@
13
13
  Using the URLconf defined in mybook.urls, Django tried these URL patterns, in this order:
14
14
 
15
15
  cms/
16
- book/ [name='book_list']
16
+ admin/
17
17
  The empty path didn't match any of these.
18
18
 
19
19
  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.

3

ここ

2020/09/26 03:43

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -30,6 +30,8 @@
30
30
  urlpatterns = [
31
31
  # 書籍
32
32
  path('cms/', include('cms.urls')),
33
- path('book/', views.book_list, name='book_list'), # 一覧
33
+ path('admin/', admin.site.urls), # 一覧
34
34
  ]
35
+
36
+ ]
35
37
  ```

2

k

2020/09/26 03:39

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,7 @@
1
1
  [参照サイト](https://qiita.com/Nidhog-tm/items/433b78a85493ed53fb14)
2
2
 
3
+ 上記のサイトを参考にwebpage作成を行っていますが、
3
- 上記のサイト参考にwebpage作成を行っていますが、実行すると "Page not found" とエラーが吐かれました。
4
+ python manage.py runserverを実行すると "Page not found" とエラーが吐かれました。
4
5
 
5
6
  urls.py関連でエラーが吐かれているのではないかと思っています。。
6
7
  原因と解決を知りてたいです。よろしくお願いします。

1

link

2020/09/26 03:36

投稿

Kenza
Kenza

スコア21

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,5 @@
1
- https://qiita.com/Nidhog-tm/items/433b78a85493ed53fb14
1
+ [参照サイト](https://qiita.com/Nidhog-tm/items/433b78a85493ed53fb14)
2
+
2
3
  上記のサイトを参考にwebpage作成を行っていますが、実行すると "Page not found" とエラーが吐かれました。
3
4
 
4
5
  urls.py関連でエラーが吐かれているのではないかと思っています。。