mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-27 06:13:02 +00:00
Fix CI, add django22-py39 CI step
This commit is contained in:
parent
4de83344a7
commit
574233acd0
@ -26,6 +26,17 @@ py38-django22:
|
|||||||
python3-docutils python3-pil python3-tz python3-six python3-sqlparse python3-stdnum python3-yaml python3-coreapi tox
|
python3-docutils python3-pil python3-tz python3-six python3-sqlparse python3-stdnum python3-yaml python3-coreapi tox
|
||||||
script: tox -e py38
|
script: tox -e py38
|
||||||
|
|
||||||
|
py39-django22:
|
||||||
|
stage: test
|
||||||
|
image: debian:bullseye
|
||||||
|
before_script:
|
||||||
|
- >
|
||||||
|
apt-get update &&
|
||||||
|
apt-get install --no-install-recommends -y
|
||||||
|
python3-django python3-django-casclient python3-django-reversion python3-djangorestframework
|
||||||
|
python3-docutils python3-pil python3-tz python3-six python3-sqlparse python3-stdnum python3-yaml python3-coreapi tox
|
||||||
|
script: tox -e py39
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
stage: quality-assurance
|
stage: quality-assurance
|
||||||
image: debian:buster-backports
|
image: debian:buster-backports
|
||||||
|
@ -93,9 +93,9 @@ class MediaAdminForm(ModelForm):
|
|||||||
side_identifier_field.widget.template_name = "media/generate_side_identifier.html"
|
side_identifier_field.widget.template_name = "media/generate_side_identifier.html"
|
||||||
|
|
||||||
def download_data_isbndb(self, isbn):
|
def download_data_isbndb(self, isbn):
|
||||||
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY")
|
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY", "")
|
||||||
req = urllib.request.Request(api_url)
|
req = urllib.request.Request(api_url)
|
||||||
req.add_header("Authorization", os.getenv("ISBNDB_KEY"))
|
req.add_header("Authorization", os.getenv("ISBNDB_KEY", ""))
|
||||||
try:
|
try:
|
||||||
with urllib.request.urlopen(req) as url:
|
with urllib.request.urlopen(req) as url:
|
||||||
data: dict = json.loads(url.read().decode())["book"]
|
data: dict = json.loads(url.read().decode())["book"]
|
||||||
|
Loading…
Reference in New Issue
Block a user