回答編集履歴

1

コードの訂正

2021/05/13 06:01

投稿

noobman
noobman

スコア1

test CHANGED
@@ -8,11 +8,11 @@
8
8
 
9
9
     @property
10
10
 
11
-  def icon_url(self):
11
+  def picture_url(self):
12
12
 
13
13
  if settings.DEBUG:
14
14
 
15
- with open(self.icon.path, 'rb') as f:
15
+ with open(self.picture.path, 'rb') as f:
16
16
 
17
17
  data = f.read()
18
18
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  import requests
24
24
 
25
- r = requests.get(self.icon.url)
25
+ r = requests.get(self.picture.url)
26
26
 
27
27
  encode_data = base64.b64encode(r.content)
28
28