質問編集履歴
1
urls.pyの追記、get_success_url内でprint()した結果の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -160,6 +160,62 @@
|
|
160
160
|
|
161
161
|
|
162
162
|
|
163
|
+
urls.py
|
164
|
+
|
165
|
+
```python
|
166
|
+
|
167
|
+
from django.urls import path
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
from . import views
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
app_name = 'shizai_kanri'
|
178
|
+
|
179
|
+
urlpatterns = [
|
180
|
+
|
181
|
+
path('', views.IndexView.as_view(),name='index'),
|
182
|
+
|
183
|
+
path('login/', views.Login.as_view(), name='login'),
|
184
|
+
|
185
|
+
path('logout/', views.Logout.as_view(), name='logout'),
|
186
|
+
|
187
|
+
path('syohindata-list/',views.SyohinDataListView.as_view(), name='syohindata-list'),
|
188
|
+
|
189
|
+
path('syohindata-create/',views.SyohinDataCreateView.as_view(), name='syohindata-create'),
|
190
|
+
|
191
|
+
path('syohindata-edit/<int:pk>/', views.SyohinDataEditView.as_view(), name='syohindata-edit'),
|
192
|
+
|
193
|
+
path('syohindata-detail/<int:pk>/', views.SyohinDataDetailView.as_view(), name='syohindata-detail'),
|
194
|
+
|
195
|
+
path('syohindata-delete/<int:pk>/', views.SyohinDataDeleteView.as_view(), name='syohindata-delete'),
|
196
|
+
|
197
|
+
path('hibidata-list/', views.HibidataListView.as_view(), name='hibidata-list'),
|
198
|
+
|
199
|
+
path('hibidatanyuka-edit/<int:pk>/', views.HibidataNyukaEditView.as_view(), name='hibidatanyuka-edit'),
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
]
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
163
219
|
現在試したことは、
|
164
220
|
|
165
221
|
```
|
@@ -196,4 +252,24 @@
|
|
196
252
|
|
197
253
|
|
198
254
|
|
255
|
+
|
256
|
+
|
199
257
|
よろしくお願いいたします。
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
追記
|
268
|
+
|
269
|
+
print(self.object.syohin_name.id) と get_success_url内で表示させてみた結果
|
270
|
+
|
271
|
+
```python
|
272
|
+
|
273
|
+
AttributeError: 'tuple' object has no attribute 'id'
|
274
|
+
|
275
|
+
```
|