2019/07/22 - [Django] - REST API 구현하기 불러오는 중입니다... 최신 자바스크립트 프레임워크 https://reactjs.org/ React – A JavaScript library for building user interfaces A JavaScript library for building user interfaces reactjs.org http://angularjs.org AngularJS — Superheroic JavaScript MVW Framework document.createElement('tabs'); document.createElement('pane'); document.createElement('ng-pluralize'); Your angularjs.o..
2019/07/22 - [Django] - REST API 이용하기 불러오는 중입니다... HTTP Method 요청 목적 HTTP Method SQL 새로운 리소스 생성 POSTa INSERT 리소스 읽기 GET SELECT 리소스의 메타데이터 요청 HEAD 리소스 데이터 업데이트 PUT UPDATE 리소스의 부분 변경 PATCH UPDATE 리소스 삭제 DELETE DELETE 특정 URL에 대해 지원되는 HTTP 메서드 출력 OPTIONS 요청(requests)에 대한 반환 에코 TRACE TCP/IP 터널링(일반적으로 구현되어 있지는 않음) CONNECT read-only API만 구현하다면 GET method만 구현 read-write API를 구현한다면 최소한 POST 메서드는 구현해야 하며 ..
https://tech.peoplefund.co.kr/2017/11/03/django-db-optimization.html Django DB 최적화 Django에서 데이터 베이스를 어떻게 효율적으로 사용하는지에 대해 설명합니다. tech.peoplefund.co.kr https://docs.djangoproject.com/en/1.11/topics/db/optimization/ Database access optimization | Django documentation | Django Django The web framework for perfectionists with deadlines. docs.djangoproject.com
Install Node.js Install Angular cli(npm install -g @angular/cli) Create a new Angular project(ng new testapp) Test it using local server(ng serve) Build the project(ng build) Integrating with Django project Copy the js files to the static folder on your Django project (helloapp/static) Copy index.html generated by angular project to the templates folder – override the existing one (first/templat..
Django 2.0에서 변경 된점 Cannot reverse a query once a slice has been taken. ListView에서 paginate_by를 추가하고 템플릿 파일에서 {{ object_list.last }}를 할 경우 위와 같은 에러 발생 AssertionErrorAssertionError: Cannot reorder a query once a slice has been taken. ListView에서 paginate_by와 ordering를 같이사용하고 템플릿 파일에서 {{ object_list.last }}를 할 경우 위와 같은 에러 발생 결론은 오더링 또는 필터된 쿼리셋을 템플릿에서 슬라이싱 할 경우 에러 발생 https://www.bugsnag.com/blog/djan..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/drdTYw/btqwLUBbX0O/a7QhJ2msKOBDW7WJB1C940/img.png)
어떠한 데이터든 간에 입력 데이터라고 한다면 장고 폼을 이용하여 유효성 검사를 해야 한다. HTML forms ... elements, a form must specify two things: where: the URL to which the data corresponding to the user's input should be returned how: the HTTP mehtod the data should be returned by Django's role in forms preparing and restructuring data to make it ready for rendering creating HTML forms for the data receiving and processing submitt..
장고의 뷰는 요청 객체를 받고 응답 객체를 반환하는 내장 함수 함수 기반 뷰는 뷰 함수 자체가 내장 함수이고, 클래스 기반 뷰는 뷰 클래스가 내장 함수를 반환하는 as_view() 클래스 메서드를 제공. django.views.generic.View에서 해당 메커니즘이 구현되며 모든 클래스 기반 뷰는 이 클래스를 직간접적으로 상속받아 이용 장고는 요즘 대부분의 웹 프로젝트에서 이용되는 제네릭 클래스 기반 뷰(generic class-based view, GCBV)를 제공. ...더보기 장고의 기본형을 보면 제네릭 클래스 기반 뷰를 위한 중요한 믹스인들이 빠져 있다. 예로 인증(Authentication) 부분 같은 것을 들 수 있다. 하지만 django-braces 라이브러리를 이용함으로써 이런 부분을 ..