Django migrations, django-filters, permissions

JunePyo Suh·2020년 10월 25일
0

Django migrations

Migration history can be found in django_migrations table in your database.
An article on Django models and migrations

Django-filters

Django-filter package

Django-property-filter

Django-property-filter package
Django-property-filter is an extension to django-filter that provides functionality to filter querysets by class @property.

Difference b/t has_object_permission and has_permission

has_permission is a check made before calling has_object_permission. In other words, one needs to be allowed by has_permission to get any chance to check the ownership test.

Moreover, has_object_permission is called from Django DRF method def get_object(self). Hence, this permission method is available for GET, PUT, DELETE methods, and not for POST request.

On the other hand, has_permission method will be called on all HTTP requests.

0개의 댓글