728x90 반응형 입력1 (파이썬 장고) CSV 를 Django를 이용해 DB에 집어넣기 사용할 DB는 코끼리..가 아니라 PostgreSQL이다 이전글인 https://samori.tistory.com/80 (파이썬 장고) DB 테이블 CSV 로 출력하기 views.py에 아래 함수를 집어넣고 def 함수명(request): response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="파일명.csv"' writer = csv.writer(response) writer.writerow(['칼럼1','칼럼2',. samori.tistory.com 과 반대로 오늘은 CSV를 DB에 입력하는 방법에 대해 알아보려고 한다. 가장 쉽게 줄인 코드는 아래와 같다. @trans.. 2023. 11. 19. 이전 1 다음 728x90 반응형