티스토리 뷰
jinozblog2019 tree : 폴더 및 파일 설명
.
├── db.sqlite3 : DB browser SQLite를 통해 Table의 생성 및 구조를 자주 확인하자.
├── jblog
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py : HTTP request 전달에 필요한 주소를 할당
│ └── wsgi.py
├── manage.py : startproject/app, runserver, showmigrations, makemigrations, migrate, shell 등 수행
└── post
├── __init__.py
├── admin.py : 관리자 모드의 view 역할
├── apps.py
├── migrations : models.py가 수정되면 showmigrations로 상태를 확인하며 생성/적용을 잊지말자.
├── models.py : DB Table에서 class 객체 생성
├── templates : 사용자가 보여지는 웹페이지(사이트) 구성, HTML로 작성하며 장고 템플릿 테그를 사용
│ ├── home.html
│ └── post_list.html
├── tests.py
└── views.py : models.py에서 인스턴스화한 객체를 사이트에 보여주는 역할
python 용어들
- package(패키지) : module(모듈)을 모아놓은 폴더, 설치한 django는 패키지에 해당
- module(모듈) : 확장자 .py에 해당하는 파이썬 파일
- object(오브젝트) : 객체를 이르는 말, 메모리에 저장된 자료
- class(클래스) : 객체의 속성과 동작을 정의한 틀, 객체는 class에 의해서 만들어짐
- method(메서드) : 보통 class내의 함수를 말함, 객체의 동작을 정의하며 호출하여 사용
DataBase 용어들
- ORM(Object Relational Mapping)
- Table : record와 field로 구성, Relation이라고도 부름, Table을 모아놓은 것을 DB라 함
- Table의 행에 해당하는 용어 : row, record, tuple
- Table의 열에 해당하는 용어 : column, field, atrribute
'python > Django' 카테고리의 다른 글
(macOS)[python] django project Heroku 배포 사전준비 - git push (0) | 2019.10.21 |
---|---|
(macOS)[python] django post_detail 구현하기 (0) | 2019.10.15 |
(macOS)[python] django post_list site에 구현하기 - 2/2 (0) | 2019.10.14 |
(macOS)[python] django post_list site에 구현하기 - 1/2 (0) | 2019.10.11 |
(macOS)[python] localhost(127.0.0.1:8000) main page에 "Welcome to visit django:jinoblog2019" 출력하기 (0) | 2019.10.10 |
- Total
- Today
- Yesterday
- arduino
- Django
- ERP
- 코로나
- Python
- analysis
- SSH
- Regression
- 자가격리
- template
- pyserial
- server
- Raspberry Pi
- MacOS
- Pandas
- COVID-19
- 라즈베리파이
- DAQ
- CSV
- vscode
- 확진
- DS18B20
- github
- sublime text
- raspberrypi
- r
- 코로나19
- Templates
- git
- Model
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |