This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://simon-schraeder.de/posts/filereader-async/ | |
function readFileAsync(file) { | |
return new Promise((resolve, reject) => { | |
let reader = new FileReader(); | |
reader.onload = () => { | |
resolve(reader.result); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/Belval/pdf2image | |
# https://www.revsys.com/tidbits/loading-django-files-from-code/ | |
import os | |
import tempfile | |
from django.core.files import File | |
from pdf2image import convert_from_path | |
from .models import CustomModel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"하늘을 우러러 한 점 부끄럼이 없기를", | |
"흙에서 자란 내마음 파란 하늘빛", | |
"넓은벌 동쪽끝으로 옛이야기", | |
"붉은 파밭의 푸른 새싹을 보아라", | |
"손금에는 맑은 강물이 흐르고", | |
"햇빛도 그늘이 있어야 맑고 눈이 부시다", | |
"엷은 졸음에 겨운 늙으신 아버지가", | |
"격의 없이 터놓은 관계라도 기본 예는 갖춤이 옳거니", | |
"이 많은 별빛이 내린 언덕 위에", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from django.core.exceptions import ImproperlyConfigured | |
# Set ENV with system variable 'DJANGO_ENV'. If 'DJANGO_ENV' is not present, then use 'development' as ENV. | |
# In production server, set 'DJANGO_ENV' as 'production' | |
ENV = os.getenv('DJANGO_ENV', 'development') |