質問編集履歴

1

状態変化による加筆

2020/06/30 05:25

投稿

sarasa_38765
sarasa_38765

スコア34

test CHANGED
File without changes
test CHANGED
@@ -153,3 +153,57 @@
153
153
  return self.name
154
154
 
155
155
  ```
156
+
157
+
158
+
159
+ #御回答頂いた内容を元に調べましてモデルへの書き込みは終了しました
160
+
161
+ ```python
162
+
163
+ from django.apps import apps
164
+
165
+ data = apps.get_model('price_data_row', 'Data')
166
+
167
+
168
+
169
+
170
+
171
+ data.trade_xls = write_id,
172
+
173
+ data.no = i_no,
174
+
175
+ data.hanbai_bi = i_hanbai_bi,
176
+
177
+ data.kotai_no = i_kotai_no,
178
+
179
+ data.cow_breeds = o_cow_breeds_id,
180
+
181
+ data.sex = o_sex_id,
182
+
183
+ data.kikaku = i_kikaku,
184
+
185
+ data.edaniku_jyuryo = i_edaniku_jyuryo,
186
+
187
+ data.edaniku_kakaku = i_edaniku_kakaku,
188
+
189
+ data.edaniku_kakaku_zei = i_edaniku_kakaku_zei,
190
+
191
+ data.hanbai_kakaku_zei = i_hanbai_kakaku_zei,
192
+
193
+ data.tochiku_cd = i_tochiku_cd,
194
+
195
+ data.tochiku_name = i_tochiku_name
196
+
197
+
198
+
199
+ data.save()
200
+
201
+ ```
202
+
203
+ #しかし今度は以下のエラーが出てしまいました
204
+
205
+ ```log
206
+
207
+ save() missing 1 required positional argument: 'self',
208
+
209
+ ```