TIL 2022.11.21 ~ 11.27

김경민·2022년 12월 30일
0

TIL

목록 보기
5/15
post-thumbnail

[TIL/86일차/11.21] Django bulk ft. 내배캠

bulk_update & bulk_create

  • .save()요청 시 쿼리요청을 보내게 되는데, 한꺼번에 많은 양의 쿼리를 요청하면 느려지게 된다. 그럴 때는 bulk_를 사용하여 효율적으로 저장을 할 수 있다.

모델.objects.bulk_update(배열, [컬럼들])

stuies = []
.
.
.
Study.objects.bulk_update(stuies, ["week_money"])

[TIL/87일차/11.22] sting을 json으로 , json을 string으로 변환하기 ft. 내배캠

json을 string으로 변환하기

JSON.stringify(딕셔너리)

string을 json으로 변환하기

JSON.parse(json형태인문자열)

[TIL/88일차/11.23] js 상대 날짜 똑똑하게 표현하기 ft. timeago

  • timeago CDN 받기
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.7/jquery.timeago.min.js"></script>
  • 한국 시간으로 원한다면?
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.5/locales/jquery.timeago.ko.js"></script>
  • 날짜 시간을 로딩 후 .timeago() 실행하여 나타내 주기!
<time class="timeago" datetime="${time}"></time>
$("time.timeago").timeago();

참조-깃헙

[TIL/89일차/11.24] Mac git 에러 xcrun: error: invalid active developer path ft. 내배캠

맥업데이트 후 명령어 에러 해결하기

xcode-select --install

[TIL/90일차/11.25] JS 삼항 연산자 ft. 내배캠

자바스크립트 삼항 연산자

condition ? exprIfTrue : exprIfFalse

조건? 참일 때 : 거짓일 때

function example() {
    return condition1 ? value1
         : condition2 ? value2
         : condition3 ? value3
         : value4;
}

[WIL] 13주차

이번 주에 대표적으로 한것

  • Docker
  • 프로젝트

회고

  • 아직 도커에 익숙하지 않아서 배포를 원활하게 못 한 느낌이 있다. 최종 프로젝트에는 좀 더 공부를 하고 잘 적용할 것이다.

다음 주에 할 것

프로젝트 구상과 진행

profile
적은 대로 된다.

0개의 댓글