본문 바로가기

TIL

TIL 080823

Q: AWS를 통해 배포할 경우, sqlite를 사용하지 않는 이유는 무엇입니까?

A:

 

https://stitchcoding.tistory.com/9

 

SQLite은 언제 사용하면 좋을까?

SQL이라는 존재 자체를 처음 접한 건 데잇걸즈 수업을 통해서였다. pandas로 csv 파일만 읽고 쓰던 작업을 하던 중에 잠시 맛보기처럼 배웠는데, 실무에서 많이 쓰인다는 건 조금 나중에 알게 되었

stitchcoding.tistory.com

https://www.sqlite.org/whentouse.html

 

Appropriate Uses For SQLite

Embedded devices and the internet of things Because an SQLite database requires no administration, it works well in devices that must operate without expert human support. SQLite is a good fit for use in cellphones, set-top boxes, televisions, game console

www.sqlite.org

https://www.sqlite.org/whentouse.html

 

Appropriate Uses For SQLite

Embedded devices and the internet of things Because an SQLite database requires no administration, it works well in devices that must operate without expert human support. SQLite is a good fit for use in cellphones, set-top boxes, televisions, game console

www.sqlite.org

 

 


Q: Django settings에서 DB 스택을 변경하는 방법은 무엇입니까?

A: 

# postgres 환경변수가 존재 할 경우에 postgres db에 연결을 시도합니다.
POSTGRES_DB = os.environ.get("POSTGRES_DB", "")
if POSTGRES_DB:
    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.postgresql",
            "NAME": POSTGRES_DB,
            "USER": os.environ.get("POSTGRES_USER", ""),
            "PASSWORD": os.environ.get("POSTGRES_PASSWORD", ""),
            "HOST": os.environ.get("POSTGRES_HOST", ""),
            "PORT": os.environ.get("POSTGRES_PORT", ""),
        }
    }

# 환경변수가 존재하지 않을 경우 sqlite3을 사용합니다.
else:
    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.sqlite3",
            "NAME": BASE_DIR / "db.sqlite3",
        }
    }

https://docs.djangoproject.com/en/4.2/ref/databases/

 

 

 

https://devpouch.tistory.com/77

 

[python] 파이썬 문자열 합치기 나누기 split/join 함수

문자열 나누기- split() 함수 파이썬에서 문자열을 쪼개는 함수는 split()함수입니다. 이 함수는 파라미터로 구분자를 주면 해당 구분자를 기준으로 문자열을 잘라 리스트 형식으로 반환합니다. 만

devpouch.tistory.com

 

'TIL' 카테고리의 다른 글

TIL 081023  (0) 2023.08.10
TIL 080923  (0) 2023.08.09
TIL 080723  (0) 2023.08.07
TIL 080423  (0) 2023.08.04
TIL 080323  (0) 2023.08.03