Incorrect use of Authorization header
This commit is contained in:
parent
91aeb28c3a
commit
263b4cff77
|
@ -97,7 +97,8 @@ class MediaAdminForm(ModelForm):
|
|||
req.add_header("Authorization", os.getenv("ISBNDB_KEY"))
|
||||
with urllib.request.urlopen(req) as url:
|
||||
data = json.loads(url.read().decode())
|
||||
self.cleaned_data["title"] = data["title_long"]
|
||||
print(data)
|
||||
self.cleaned_data["title"] = data["title"]
|
||||
self.cleaned_data["published_date"] = data["date_published"][:10]
|
||||
self.cleaned_data["number_of_pages"] = data["pages"]
|
||||
self.cleaned_data["authors"] = \
|
||||
|
|
Loading…
Reference in New Issue