mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-07 18:40:13 +02:00
Add a model to store future media list.
This commit is contained in:
@ -41,7 +41,7 @@ class MediaAdminForm(ModelForm):
|
||||
Download data from google books
|
||||
:return True if success
|
||||
"""
|
||||
api_url = "https://www.googleapis.com/books/v1/volumes?q=isbn:{}".format(isbn)
|
||||
api_url = "https://www.googleapis.com/books/v1/volumes?q=ISBN:{}".format(isbn)
|
||||
with urllib.request.urlopen(api_url) as url:
|
||||
data = json.loads(url.read().decode())
|
||||
|
||||
@ -234,8 +234,6 @@ class MediaAdminForm(ModelForm):
|
||||
).casefold().upper()
|
||||
self.cleaned_data['side_identifier'] = side_identifier
|
||||
|
||||
print(self.cleaned_data)
|
||||
|
||||
return self.cleaned_data
|
||||
|
||||
def _clean_fields(self):
|
||||
|
Reference in New Issue
Block a user