django구조(2)
-
polls 질문page 만들기
-template는 data랑 합쳐지기때문에 html이랑은 좀 다르다 -template engine이 주체가 되어 view에서 나오는 context값도 알고 html도 알고 있어 context dic값을 사용할수 있다 ctrl + chift + / (html주석) : {% comment %} = temlate의 특별한 표현법 rendering전에 rendering engice이 주석처리, html주석은 브라우저가 주석처리 {% %} - template tag, 로직, 프로그램적요소 사용가능 {{ }} - 값을 찍고싶을때는 중괄호 2개이다 {% if %} - 사용시 :를 안써도 되지만 마지막에 {% endif %}를 작성해야한다 ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ -질문 페이지 만들기 1. data(row..
2021.07.23 -
poll project 파일 구조
poll project 구조 db.sqlite3 : database파일 (Django가 default(기본)로 제공해주는 sql lite3 ) manage.py : 장고 명령어를 처리하는 파일 (건들이지 마3) -mysite (프로젝트 명) settiong.py : 프로젝트의 설정파일 urls,py : 프로젝트 level에서 url패턴을 정리하는 최상위 url configratration파일 wsgi.py : 웹서버와 어플리케이션간의 통신규약 , (건드리지마 !!) - polls : application 모음 admin.py : 관리자페이지를 자동으로 생성해주는데 여기서 data를 확인할수 있다,즉 admin site에 model class를 등록 apps.py : application의 설정 파일 mo..
2021.07.21