$ pip install django-filter # settings.py REST_FRAMEWORK = { 'DEFAULT_FILTER_BACKENDS': ( 'django_filters.rest_framework.DjangoFilterBackend', 'rest_framework.filters.SearchFilter', 'rest_framework.filters.OrderingFilter', ), } DEFAULT_FILTER_BACKENDS rest_framework.filters.BaseFilterBackend: 필드 필터링 기능을 제공. 앞서 설치한 django-filter 패키지를 사용. 필터링할 수 있는 필드 세트를 지정하거나 좀 더 사용자 정의된 설정이 들어간 rest_framework.f..
인증체계? request.user: 사용자 모델 인스턴스. django.contrib.auth.User requet.auth: 인증 토큰과 같은 추가 인증 정보 Django Rest Framwork는 rest_framework.authentication 모듈에서 다음 세 가지 인증 클래스를 제공. 모두 BaseAuthentication 클래스의 서브 클래스. BasicAuthentication: 사용자 이름과 암호에 대한 HTTP 기본 인증을 제공한다. 제품으로 사용하는 경우에는 API가 HTTPS에서만 사용 가능해야 한다. SessionAuthentication: 인증을 위해 장고의 세션 프레임워크와 함께 작동 TokenAuthentication: 간단한 토큰 기반 인증을 제공. 요청에는 토큰의 접두어..
http://books.agiliq.com/en/latest/ Books by Agiliq — Books by Agiliq documentation Building Multi Tenant Applications with Django Building multi tenant applications with Django teaches how to build multi tenant apps and the various approaches to multi tenancy. In this book, you will rebuild the same app using the various methods to achie books.agiliq.com https://github.com/encode Encode Collabor..