質問編集履歴
7
試したこと3を追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,6 +48,11 @@
|
|
48
48
|
import uuid
|
49
49
|
|
50
50
|
class Diary(models.Model):
|
51
|
+
|
52
|
+
class Meta:
|
53
|
+
abstract = True
|
54
|
+
app_label = 'diary'
|
55
|
+
|
51
56
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
52
57
|
date = models.DateField(verbose_name='日付', default=timezone.now)
|
53
58
|
title = models.CharField(verbose_name='タイトル', max_length=40)
|
@@ -55,6 +60,133 @@
|
|
55
60
|
created_at = models.DateTimeField(verbose_name='作成日時', default=timezone.now)
|
56
61
|
updated_at = models.DateTimeField(verbose_name='編集日時', blank=True, null=True)
|
57
62
|
```
|
63
|
+
```settings.py
|
64
|
+
"""
|
65
|
+
Django settings for config project.
|
66
|
+
|
67
|
+
Generated by 'django-admin startproject' using Django 4.0.6.
|
68
|
+
|
69
|
+
For more information on this file, see
|
70
|
+
https://docs.djangoproject.com/en/4.0/topics/settings/
|
71
|
+
|
72
|
+
For the full list of settings and their values, see
|
73
|
+
https://docs.djangoproject.com/en/4.0/ref/settings/
|
74
|
+
"""
|
75
|
+
|
76
|
+
import os
|
77
|
+
from pathlib import Path
|
78
|
+
|
79
|
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
80
|
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
81
|
+
|
82
|
+
|
83
|
+
# Quick-start development settings - unsuitable for production
|
84
|
+
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
85
|
+
|
86
|
+
# SECURITY WARNING: keep the secret key used in production secret!
|
87
|
+
SECRET_KEY = 'django-insecure-#0ud%e$1#w9*4g=a#x3nwe=0y+afe^@_1*u=%b!8szxaq%#7ig'
|
88
|
+
|
89
|
+
# SECURITY WARNING: don't run with debug turned on in production!
|
90
|
+
DEBUG = True
|
91
|
+
|
92
|
+
ALLOWED_HOSTS = []
|
93
|
+
|
94
|
+
|
95
|
+
# Application definition
|
96
|
+
|
97
|
+
INSTALLED_APPS = [
|
98
|
+
'django.contrib.admin',
|
99
|
+
'django.contrib.auth',
|
100
|
+
'django.contrib.contenttypes',
|
101
|
+
'django.contrib.sessions',
|
102
|
+
'django.contrib.messages',
|
103
|
+
'django.contrib.staticfiles',
|
104
|
+
]
|
105
|
+
|
106
|
+
MIDDLEWARE = [
|
107
|
+
'django.middleware.security.SecurityMiddleware',
|
108
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
109
|
+
'django.middleware.common.CommonMiddleware',
|
110
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
111
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
112
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
113
|
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
114
|
+
]
|
115
|
+
|
116
|
+
ROOT_URLCONF = 'config.urls'
|
117
|
+
|
118
|
+
TEMPLATES = [
|
119
|
+
{
|
120
|
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
121
|
+
'DIRS': [os.path.join(BASE_DIR, 'templates'),],
|
122
|
+
'APP_DIRS': True,
|
123
|
+
'OPTIONS': {
|
124
|
+
'context_processors': [
|
125
|
+
'django.template.context_processors.debug',
|
126
|
+
'django.template.context_processors.request',
|
127
|
+
'django.contrib.auth.context_processors.auth',
|
128
|
+
'django.contrib.messages.context_processors.messages',
|
129
|
+
],
|
130
|
+
},
|
131
|
+
},
|
132
|
+
]
|
133
|
+
|
134
|
+
WSGI_APPLICATION = 'config.wsgi.application'
|
135
|
+
|
136
|
+
|
137
|
+
# Database
|
138
|
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
139
|
+
|
140
|
+
DATABASES = {
|
141
|
+
'default': {
|
142
|
+
'ENGINE': 'django.db.backends.sqlite3',
|
143
|
+
'NAME': BASE_DIR / 'db.sqlite3',
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
# Password validation
|
149
|
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
150
|
+
|
151
|
+
AUTH_PASSWORD_VALIDATORS = [
|
152
|
+
{
|
153
|
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
154
|
+
},
|
155
|
+
{
|
156
|
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
157
|
+
},
|
158
|
+
{
|
159
|
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
160
|
+
},
|
161
|
+
{
|
162
|
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
163
|
+
},
|
164
|
+
]
|
165
|
+
|
166
|
+
|
167
|
+
# Internationalization
|
168
|
+
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
169
|
+
|
170
|
+
LANGUAGE_CODE = 'ja-jp'
|
171
|
+
|
172
|
+
TIME_ZONE = 'Asia/Tokyo'
|
173
|
+
|
174
|
+
USE_I18N = True
|
175
|
+
|
176
|
+
USE_TZ = True
|
177
|
+
|
178
|
+
|
179
|
+
# Static files (CSS, JavaScript, Images)
|
180
|
+
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
181
|
+
|
182
|
+
STATIC_URL = 'static/'
|
183
|
+
|
184
|
+
# Default primary key field type
|
185
|
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
186
|
+
|
187
|
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
188
|
+
|
189
|
+
```
|
58
190
|
|
59
191
|
### 試したこと1
|
60
192
|
```Python
|
@@ -82,65 +214,19 @@
|
|
82
214
|
エラーメッセージが変わりました。
|
83
215
|
|
84
216
|
```エラーメッセージ
|
85
|
-
Users/user/djangotutorial/mydiaryproject/diary/views.py:10: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
|
86
|
-
success_url = 'reverse_lazy'('diary:diary_create_complete')
|
87
|
-
Traceback (most recent call last):
|
88
|
-
File "manage.py", line 22, in <module>
|
89
|
-
main()
|
90
|
-
File "manage.py", line 18, in main
|
91
|
-
execute_from_command_line(sys.argv)
|
92
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
|
93
|
-
utility.execute()
|
94
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
|
95
|
-
self.fetch_command(subcommand).run_from_argv(self.argv)
|
96
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
|
97
|
-
self.execute(*args, **cmd_options)
|
98
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 455, in execute
|
99
|
-
self.check()
|
100
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 487, in check
|
101
|
-
all_issues = checks.run_checks(
|
102
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
|
103
|
-
new_errors = check(app_configs=app_configs, databases=databases)
|
104
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config
|
105
|
-
return check_resolver(resolver)
|
106
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
|
107
|
-
return check_method()
|
108
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 480, in check
|
109
|
-
for pattern in self.url_patterns:
|
110
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in __get__
|
111
|
-
res = instance.__dict__[self.name] = self.func(instance)
|
112
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 696, in url_patterns
|
113
|
-
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
|
114
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in __get__
|
115
|
-
res = instance.__dict__[self.name] = self.func(instance)
|
116
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 689, in urlconf_module
|
117
|
-
return import_module(self.urlconf_name)
|
118
|
-
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
|
119
|
-
return _bootstrap._gcd_import(name[level:], package, level)
|
120
|
-
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
|
121
|
-
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
|
122
|
-
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
|
123
|
-
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
|
124
|
-
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
|
125
|
-
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
|
126
|
-
File "/Users/user/djangotutorial/mydiaryproject/config/urls.py", line 6, in <module>
|
127
|
-
path('', include('diary.urls')),
|
128
|
-
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/conf.py", line 38, in include
|
129
|
-
urlconf_module = import_module(urlconf_module)
|
130
|
-
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
|
131
|
-
return _bootstrap._gcd_import(name[level:], package, level)
|
132
|
-
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
|
133
|
-
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
|
134
|
-
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
|
135
|
-
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
|
136
|
-
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
|
137
|
-
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
|
138
|
-
File "/Users/user/djangotutorial/mydiaryproject/diary/urls.py", line 2, in <module>
|
139
|
-
from . import views
|
140
|
-
File "/Users/user/djangotutorial/mydiaryproject/diary/views.py", line 7, in <module>
|
141
|
-
class DiaryCreateView(CreateView):
|
142
|
-
File "/Users/user/djangotutorial/mydiaryproject/diary/views.py", line 10, in DiaryCreateView
|
143
217
|
success_url = 'reverse_lazy'('diary:diary_create_complete')
|
144
218
|
TypeError: 'str' object is not callable
|
145
219
|
```
|
146
220
|
|
221
|
+
### 試したこと3
|
222
|
+
models.pyに下記コードを追加しました。
|
223
|
+
```
|
224
|
+
class Meta:
|
225
|
+
abstract = True
|
226
|
+
app_label = 'diary'
|
227
|
+
```
|
228
|
+
エラーメッセージが下記に変わりました。
|
229
|
+
```エラーメッセージ
|
230
|
+
No changes detected
|
231
|
+
```
|
232
|
+
|
6
該当のソースコード変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
from django.views.generic import TemplateView
|
21
21
|
from django.views.generic import CreateView
|
22
22
|
from django.urls import reverse_lazy
|
23
|
-
from
|
23
|
+
from .forms import DiaryForm
|
24
24
|
|
25
25
|
class IndexView(TemplateView):
|
26
26
|
template_name = 'index.html'
|
@@ -30,9 +30,8 @@
|
|
30
30
|
form_class = 'DiaryForm'
|
31
31
|
success_url = reverse_lazy('diary:diary_create_complete')
|
32
32
|
|
33
|
-
class DiaryCreateCompleteView(TemplateView):
|
33
|
+
class DiaryCreateCompleteView(TemplateView):
|
34
34
|
template_name = 'diary_create_complete.html'
|
35
|
-
success_url = reverse_lazy('diary:diary_create_complete')
|
36
35
|
```
|
37
36
|
```forms.py
|
38
37
|
from django import forms
|
5
該当のソースコード変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
form_class = 'DiaryForm'
|
31
31
|
success_url = reverse_lazy('diary:diary_create_complete')
|
32
32
|
|
33
|
-
class DiaryCreateCompleteView(TemplateView):
|
33
|
+
class DiaryCreateCompleteView(TemplateView):
|
34
34
|
template_name = 'diary_create_complete.html'
|
35
35
|
success_url = reverse_lazy('diary:diary_create_complete')
|
36
36
|
```
|
4
該当のソースコードを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,11 +16,45 @@
|
|
16
16
|
|
17
17
|
### 該当のソースコード
|
18
18
|
|
19
|
-
```
|
19
|
+
```views.py
|
20
|
+
from django.views.generic import TemplateView
|
21
|
+
from django.views.generic import CreateView
|
22
|
+
from django.urls import reverse_lazy
|
23
|
+
from django.forms import CreateView
|
24
|
+
|
25
|
+
class IndexView(TemplateView):
|
26
|
+
template_name = 'index.html'
|
27
|
+
|
20
|
-
class DiaryCreateView(CreateView):
|
28
|
+
class DiaryCreateView(CreateView):
|
21
29
|
template_name = 'diary_create.html'
|
22
|
-
form_class = DiaryForm
|
30
|
+
form_class = 'DiaryForm'
|
23
31
|
success_url = reverse_lazy('diary:diary_create_complete')
|
32
|
+
|
33
|
+
class DiaryCreateCompleteView(TemplateView):
|
34
|
+
template_name = 'diary_create_complete.html'
|
35
|
+
success_url = reverse_lazy('diary:diary_create_complete')
|
36
|
+
```
|
37
|
+
```forms.py
|
38
|
+
from django import forms
|
39
|
+
from .models import Diary
|
40
|
+
|
41
|
+
class DiaryForm(forms.ModelForm):
|
42
|
+
class Meta:
|
43
|
+
model = Diary
|
44
|
+
fields = ('date', 'title', 'text',)
|
45
|
+
```
|
46
|
+
```models.py
|
47
|
+
from django.db import models
|
48
|
+
from django.utils import timezone
|
49
|
+
import uuid
|
50
|
+
|
51
|
+
class Diary(models.Model):
|
52
|
+
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
53
|
+
date = models.DateField(verbose_name='日付', default=timezone.now)
|
54
|
+
title = models.CharField(verbose_name='タイトル', max_length=40)
|
55
|
+
text = models.CharField(verbose_name='本文', max_length=200)
|
56
|
+
created_at = models.DateTimeField(verbose_name='作成日時', default=timezone.now)
|
57
|
+
updated_at = models.DateTimeField(verbose_name='編集日時', blank=True, null=True)
|
24
58
|
```
|
25
59
|
|
26
60
|
### 試したこと1
|
3
試したこと2を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
success_url = reverse_lazy('diary:diary_create_complete')
|
24
24
|
```
|
25
25
|
|
26
|
-
### 試したこと
|
26
|
+
### 試したこと1
|
27
27
|
```Python
|
28
28
|
form_class = DiaryForm
|
29
29
|
success_url = reverse_lazy('diary:diary_create_complete')
|
@@ -35,3 +35,79 @@
|
|
35
35
|
```
|
36
36
|
と出ました。
|
37
37
|
|
38
|
+
### 試したこと2
|
39
|
+
|
40
|
+
下記のようにシングルクォーテーションをつけたところ
|
41
|
+
|
42
|
+
```Python
|
43
|
+
class DiaryCreateView(CreateView):
|
44
|
+
template_name = 'diary_create.html'
|
45
|
+
form_class = 'DiaryForm'
|
46
|
+
success_url = 'reverse_lazy'('diary:diary_create_complete')
|
47
|
+
```
|
48
|
+
|
49
|
+
エラーメッセージが変わりました。
|
50
|
+
|
51
|
+
```エラーメッセージ
|
52
|
+
Users/user/djangotutorial/mydiaryproject/diary/views.py:10: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
|
53
|
+
success_url = 'reverse_lazy'('diary:diary_create_complete')
|
54
|
+
Traceback (most recent call last):
|
55
|
+
File "manage.py", line 22, in <module>
|
56
|
+
main()
|
57
|
+
File "manage.py", line 18, in main
|
58
|
+
execute_from_command_line(sys.argv)
|
59
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
|
60
|
+
utility.execute()
|
61
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
|
62
|
+
self.fetch_command(subcommand).run_from_argv(self.argv)
|
63
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
|
64
|
+
self.execute(*args, **cmd_options)
|
65
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 455, in execute
|
66
|
+
self.check()
|
67
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/management/base.py", line 487, in check
|
68
|
+
all_issues = checks.run_checks(
|
69
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
|
70
|
+
new_errors = check(app_configs=app_configs, databases=databases)
|
71
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config
|
72
|
+
return check_resolver(resolver)
|
73
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
|
74
|
+
return check_method()
|
75
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 480, in check
|
76
|
+
for pattern in self.url_patterns:
|
77
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in __get__
|
78
|
+
res = instance.__dict__[self.name] = self.func(instance)
|
79
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 696, in url_patterns
|
80
|
+
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
|
81
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in __get__
|
82
|
+
res = instance.__dict__[self.name] = self.func(instance)
|
83
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 689, in urlconf_module
|
84
|
+
return import_module(self.urlconf_name)
|
85
|
+
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
|
86
|
+
return _bootstrap._gcd_import(name[level:], package, level)
|
87
|
+
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
|
88
|
+
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
|
89
|
+
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
|
90
|
+
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
|
91
|
+
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
|
92
|
+
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
|
93
|
+
File "/Users/user/djangotutorial/mydiaryproject/config/urls.py", line 6, in <module>
|
94
|
+
path('', include('diary.urls')),
|
95
|
+
File "/Users/user/djangotutorial/.djangoenv/lib/python3.8/site-packages/django/urls/conf.py", line 38, in include
|
96
|
+
urlconf_module = import_module(urlconf_module)
|
97
|
+
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
|
98
|
+
return _bootstrap._gcd_import(name[level:], package, level)
|
99
|
+
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
|
100
|
+
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
|
101
|
+
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
|
102
|
+
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
|
103
|
+
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
|
104
|
+
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
|
105
|
+
File "/Users/user/djangotutorial/mydiaryproject/diary/urls.py", line 2, in <module>
|
106
|
+
from . import views
|
107
|
+
File "/Users/user/djangotutorial/mydiaryproject/diary/views.py", line 7, in <module>
|
108
|
+
class DiaryCreateView(CreateView):
|
109
|
+
File "/Users/user/djangotutorial/mydiaryproject/diary/views.py", line 10, in DiaryCreateView
|
110
|
+
success_url = 'reverse_lazy'('diary:diary_create_complete')
|
111
|
+
TypeError: 'str' object is not callable
|
112
|
+
```
|
113
|
+
|
2
初心者マークを付けた。
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
### 該当のソースコード
|
18
18
|
|
19
19
|
```Python
|
20
|
-
class DiaryCreateView(CreateView):
|
20
|
+
class DiaryCreateView(CreateView):
|
21
21
|
template_name = 'diary_create.html'
|
22
22
|
form_class = DiaryForm
|
23
23
|
success_url = reverse_lazy('diary:diary_create_complete')
|
1
誤字修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,13 +24,13 @@
|
|
24
24
|
```
|
25
25
|
|
26
26
|
### 試したこと
|
27
|
-
```
|
27
|
+
```Python
|
28
28
|
form_class = DiaryForm
|
29
29
|
success_url = reverse_lazy('diary:diary_create_complete')
|
30
30
|
```
|
31
31
|
を削除してみたところ
|
32
32
|
|
33
|
-
```
|
33
|
+
```エラーメッセージ
|
34
34
|
No changes detected
|
35
35
|
```
|
36
36
|
と出ました。
|