2020 프로젝트/AirBnB Project9 Challenge D+5 추상 클래스 - DB 테이블 만들지 않는 기본 모델 클래스. python manage.py startapp core Core Model created_at(auto_add) updated_at(auto_add) class Meta: abstract=True Core Model DateField - auto_now_add : 객체가 처음 생성될 때 자동으로 현재시각이 필드 값이 되도록 함. DateField - auto_add : 객체가 저장될 때마다 자동으로 현재 시각이 필드 값이 되도록 함. ⇒ created_at, updated_at class Meta: ordering : 기본 정렬 결정 db_table : 테이블의 이름을 결정 verbose_name : 사용자를 위한 이름 결정 IntegerFie.. 2021. 12. 6. Challenge D+5 Quiz 오늘의 강의: 에어비앤비 클론코딩 all the videos from section #7 오늘의 과제: 위의 강의를 시청하신 후, 아래 퀴즈를 풀면 됩니다. score : 6/11 QUESTION 2 OF 11 INCORRECT What is a 'manager' in Django? Is what we use to register a model Is what we user to access the DB using Python code Is what we use to access the admin panel Is what we use to create an app QUESTION 3 OF 11 INCORRECT Where is the manager on the User model? User.manager .. 2021. 12. 3. #10. urls and views / 라는 url로 접근했을 때, Page not found 노랑페이지 대신 방의 리스트가 보였으면 좋겠대. config> urls.py : /login : * view : 요청에 답(answer)하는 방법 * url : 요청(request)에 바로 응답하는 방법 방을 보여주는 rooms application에 모든 방의 리스트를 보여주는 함수를 위치시킬거임. rooms의 views.py에 config > urls.py 파일이 엄청나게 커지는걸 원하지않음!! divide and conquer! "/rooms"로 시작하는 url은 rooms안의 파일로 가게 할거임. "/users"로 시작하는 url은 users안의 파일로 가게 할거고. /login, /home, /logout 처럼 아무 application.. 2020. 3. 29. #9.2 make lists 이거 진짜 이해 안간당. 다시 보면서 흐름 익혀야할듯. 젠장. list의 number of rooms가 0으로 찍히네... 모르니까 이거 원인을 못찾겠다ㅠ 일단 pass #9.8 seed_reservations seed_conversations를 볼필요는 없기때문에 만들지 않아도 되. 로그인한 유저만 가질수이쓴ㄴ것이기때문에 conversations를 만들필요는 없음. reservations를 만들거임. 체크아웃이 체크인 전에 되면 안됨. user, guests, room이 필요함. 2020. 3. 28. 이전 1 2 3 다음