Django 65

[django 실습] 게시판 만들기 - 한글 설정, 한국 시간 설정, 데이터 자르기, 정렬하기

[django] python django 게시판 만들기 - setting 설정, 데이터 자르기, 정렬하기 게시물의 리스트 정렬과 setting 설정 setting 알아보기 model, admin 설정 : https://integer-ji.tistory.com/89 views에 데이터 가져오기 : https://integer-ji.tistory.com/90 detail page 만들기 : https://integer-ji.tistory.com/91 언제나 시작은 가상 환경 실행, 디렉터리 이동 source myvenv/Scripts/activate cd crudproject/ 현재 home.html의 문제점 1. 이상한 시간설정 2. 리스트의 정렬이 1번째글이 맨 위 3. 본문 내용을 자세히 안봐도 본문 ..

[django 실습] 게시판 만들기 - detail page 만들기

python django 게시판 만들기 - detail page 만들기 model, admin 설정 : https://integer-ji.tistory.com/89 views에 데이터 가져오기 : https://integer-ji.tistory.com/90 언제나 시작은 가상 환경 실행, 디렉터리 이동 source myvenv/Scripts/activate cd crudproject/ 새로운 페이지.html 생성하는 방법 html을 만들면 해야할것 3가지 1. templates 폴더 안에 html파일 만들기 2. views.py에 함수 설정하기 3. urls.py url 만들기 crudapp/templates/detail.html 만들기 views.py detail 함수 설정 from django.sho..

[django 실습] 게시판 만들기 - model, admin 설정

python django 게시판 만들기 - model, admin 설정 python django를 이용한 게시판 만들기 시작 word count 실습을 끝낸 상태에서 시작 하겠습니다. mtv 패턴에서 드디어 m인 model 등장 vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 설정하기 : https://integer-ji.tistory.com/81 hello world 띄우기 : https://integer-ji.tistory.com/82 git 초기 설정 : https://integer-j..

[django] 실습 Word Count 만들기 ( 1 )

python django 단어 수를 체크하는 Word Count 만들기 문자열을 입력받아 해당 단어를 체크하고 카운트하는 Word Count 실습입니다. vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 설정하기 : https://integer-ji.tistory.com/81 hello world 띄우기 : https://integer-ji.tistory.com/82 git 초기 설정 : https://integer-ji.tistory.com/83 page 이동 : https://integer..

[django 기초] 페이지 이동, git push, 템플릿 태그

[django 기초] 페이지 이동, git push, 템플릿 태그 vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 설정하기 : https://integer-ji.tistory.com/81 hello world 띄우기 : https://integer-ji.tistory.com/82 git 초기 설정 : https://integer-ji.tistory.com/83 새로운 페이지.html 생성 new page! 새로운 페이지 new.html을 템플릿 폴더 아래에 생성 views.py 등록 def ..

[django 기초] vscode git 초기 설정, git push, git 강제 push

[django 기초] vscode git 초기 설정, git push, git 강제 push vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 설정하기 : https://integer-ji.tistory.com/81 hello world 띄우기 : https://integer-ji.tistory.com/82 ▶▶ .gitignore 들기 전에 필수 ◀◀ .gitignore 설정하기 : https://integer-ji.tistory.com/179 django secret key 분리하기 : h..

[django 기초] project 생성, app 생성, hello world 띄우기, MTV 패턴

[django 기초] project 생성, app 생성, hello world 띄우기 vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 설정하기 : https://integer-ji.tistory.com/81 Django를 이용해 project 만들기 django-admin startproject crudproject pip 업그레이드가 완료되었다면 django-admin을 이용해 project를 만들어 줍니다. crudproject라는 이름의 프로젝트를 만들어 주었는데 이 또한 마찬가지로 p..

[django 기초] vscode 설정, git bash, django 설치, venv 생성

[django 기초] vscode 설정, git bash, django 설치, venv 생성 예전에 진행했던 django를 이용한 CRUD를 리뉴얼하고 궁금했던 거 공부하는 식으로 적어보기 vscode 설치하기 : https://integer-ji.tistory.com/65 python 설치하기 : https://integer-ji.tistory.com/64 git 설치하기 : https://integer-ji.tistory.com/66 vscode 실행 Terminal Default 설정 ctrl + shift + p -> Terminal: Select Default Shell -> Git Bash Git Bash를 사용할 것이니 Git Bash ctrl + shift + `(물결) -> bash 터미..

KKU likelion django project (마무리)

이번 시간에는 깔끔하지 못한 django project를 조금씩 수정하며 끝내겠습니다. 1. 템플릿 필터 시간을 표시하는 법을 models.py에 정의를 할 때 아무것도 주지 않아 평범하게 나옵니다. 이 부분을 템플릿 필터를 사용하여 바꿔보겠습니다. settings.py에 해당 내용을 넣습니다. 'django.contrib.humanize', 그다음에는 pub_date가 있는 home.html로 가서 {% load humanize %} 해당 내용을 맨 상단에 넣어 load 해준 뒤 시간 : {{ post.pub_date | naturaltime }} pub_date 뒤에 새로운 템플릿 필터인 naturaltime를 넣어줍시다. 그러면 짜잔 좀더 멋있게 바뀌었습니다. 물론 models.py에 class를 ..

python django heroku + aws s3 이용하기 (마무리)

저번 강의부터 이어서 시작하겠습니다. 1. Django 설정 1-1. django_storages 설치하기 장고의 파일 시스템을 이용하기 위하여 storages를 설치하여 줍시다. pip install django_storages 해당 명령어로 storages를 설치하였다면 settings.py에서 installed_apps에 storages를 설치하였다고 알려줍시다. 그다음은 s3버킷을 편하게 제어하기 위하여 boot3을 설치하여야 합니다. pip install boto3 boot3는 안 알려 줘도 됩니다. 1-2. settingsp.py 설정 settings.py에 들어와서 S3버킷과 연결하기 위해 설정을 해줍시다. DEFAULT_FILE_STORAGE = 'postproject.storages.Me..