質問編集履歴
2
余計な部分の削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,108 +8,10 @@
|
|
8
8
|
|
9
9
|
###該当のソースコード
|
10
10
|
|
11
|
-
blog/blog/settings.py(抜粋)
|
12
|
-
|
13
|
-
```
|
14
|
-
|
15
|
-
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
INSTALLED_APPS = [
|
20
|
-
|
21
|
-
'django.contrib.admin',
|
22
|
-
|
23
|
-
'django.contrib.auth',
|
24
|
-
|
25
|
-
'django.contrib.contenttypes',
|
26
|
-
|
27
|
-
'django.contrib.sessions',
|
28
|
-
|
29
|
-
'django.contrib.messages',
|
30
|
-
|
31
|
-
'django.contrib.staticfiles',
|
32
|
-
|
33
|
-
'posts',
|
34
|
-
|
35
|
-
]
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
ROOT_URLCONF = 'blog.urls'
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
STATIC_URL = '/static/'
|
44
|
-
|
45
|
-
STATICFILES_DIRS = (
|
46
|
-
|
47
|
-
os.path.join(BASE_DIR, "static"),
|
48
|
-
|
49
|
-
)
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
11
|
blog/posts/templates/posts/base.html(抜粋)
|
54
12
|
|
55
13
|
```
|
56
14
|
|
57
|
-
{% load staticfiles %}
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<!DOCTYPE html>
|
62
|
-
|
63
|
-
<html lang="ja">
|
64
|
-
|
65
|
-
<head>
|
66
|
-
|
67
|
-
<meta charset="utf-8">
|
68
|
-
|
69
|
-
<title>Blog</title>
|
70
|
-
|
71
|
-
<!-- <link href="http://fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext" rel="stylesheet" type="text/css"> -->
|
72
|
-
|
73
|
-
|
15
|
+
<link rel="stylesheet" href="posts.css">
|
74
|
-
|
75
|
-
</head>
|
76
16
|
|
77
17
|
```
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
blog/posts/templates/posts/post_list.html(抜粋)
|
82
|
-
|
83
|
-
```
|
84
|
-
|
85
|
-
{% extends 'posts/base.html' %}
|
86
|
-
|
87
|
-
{% load staticfiles %}
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
{% block content %}
|
92
|
-
|
93
|
-
{% for post in posts %}
|
94
|
-
|
95
|
-
<div class="post">
|
96
|
-
|
97
|
-
<div class="date">
|
98
|
-
|
99
|
-
<!-- {{ post.published_date }} -->
|
100
|
-
|
101
|
-
{{ post.created_date }}
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
<h1><a href="/post/{{ post.id }}/">{{ post.title }}</a></h1>
|
106
|
-
|
107
|
-
<p>{{ post.text|linebreaks }}</p>
|
108
|
-
|
109
|
-
</div>
|
110
|
-
|
111
|
-
{% endfor %}
|
112
|
-
|
113
|
-
{% endblock content %}
|
114
|
-
|
115
|
-
```
|
1
初心者マークの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|