resource owner client(web program = hompage)resource server(google, facebook)user의 id, password를 통해resource server로 부터 user의 google, facebook 의 id, pa
Copying model instances Although there is no built-in method for copying model instances, it is possible to easily create new instance with all field
Keep this caching behavior in mind, because it may bite you if you don’t use your QuerySets correctly. For example, the following will create two Quer
Django provides F expressions to allow such comparisons. Instances of F() act as a reference to a model field within a query. These references can the
When you are filtering an object based on a ManyToManyField or a reverse ForeignKey, there are two different sorts of filter you may be interested in.
https://docs.djangoproject.com/en/3.1/topics/db/queries/\`models.py'django 3.0 부터 extensions 에서 orm 사용할 때 error 난다https://stackoverflow.com/
https://docs.djangoproject.com/en/3.1/topics/auth/ https://docs.djangoproject.com/en/3.1/topics/auth/default/
members/models.pypost/models.pyuploaded_to MEDIA_ROOT 파일 밑에 저장 경로를 지정하는 옵션이다.settings.py$ pip install pillow urls.pyHTTP Scheme + HOST+ MEDIA_URL + F
model jupyter notebookPlace model을 상속받은 Restaurant model은 자동적으로 One To One으로 Place와 관계를 같게 된다.그래서 r1이 만들어 질 경우 자동적으로 Place 모델 인스턴스로빽다방이라는 장소 컬럼 데이터가 생
app ├── config │ ├── init.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── inheritance │ ├── init.py │ └── abstract │
django crontab을 사용하여 크롤링 데이터를 주기적으로 업데이트 하는작업을 구현했습니다.먼저 app├── config│ ├── asgi.py│ ├── settings.py│ ├── urls.py│ └── wsgi.py├── crawler ( ./
ordering뒤에 오는 colum을 기준으로 나열 할 수 있다.verbose_name_plural 모델 class에 대한 이름 설정비지니스 로직을 담는 곳이다!self.(fieldname) 을 이용해서 method 의 비지니스 로직을 녹여 사용한다.@property
help_textadmin site에서 필드 입력란 밑에 설명을 해주는 옵션이다.verbose_nameadmin site에서 필드명을 설정해 준다.
증권 데이터 가져오기daum 에서 증권 데이터를 가져오는데텅빈 데이터 값을 받았다 이런 경우, 비동기식 방식으로 요청하고 받는 데이터 이기에 개발자 모드(F12) network를 살펴보면fina그림에 finance.daum.net ranks?limit=10 ....을
대상 웹 페이지 조건 확인/robot.txt(웹클롤링 url 확인)( www.daum.net/robot.txt , naver.com/robot.txt ... 확인해보아라)크롤러 분류 - 상태 유무, Javascript 유무Request 요청 주의 할 점 - 서버 부하
Django 의settings 를 분리 하여 다중 개발 환경 세팅을 하는 것을 공부했다settings/init.pybase.pydev_dooh.pydev_hy.pylocal.pystaging.pytest.pyproduction.py이렇게 settings 파일을 패키지로