2017-08-17 17:18:14 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from rest_framework.permissions import DjangoModelPermissions
|
|
|
|
|
|
|
|
|
2017-10-22 18:00:42 +00:00
|
|
|
class BabyBuddyDjangoModelPermissions(DjangoModelPermissions):
|
2017-08-17 17:18:14 +00:00
|
|
|
perms_map = {
|
|
|
|
'GET': ['%(app_label)s.view_%(model_name)s'],
|
2017-12-05 21:40:10 +00:00
|
|
|
'OPTIONS': ['%(app_label)s.add_%(model_name)s'],
|
2017-08-17 17:18:14 +00:00
|
|
|
'HEAD': [],
|
|
|
|
'POST': ['%(app_label)s.add_%(model_name)s'],
|
2017-12-05 21:40:10 +00:00
|
|
|
# 'PUT': ['%(app_label)s.change_%(model_name)s'],
|
|
|
|
# 'PATCH': ['%(app_label)s.change_%(model_name)s'],
|
|
|
|
# 'DELETE': ['%(app_label)s.delete_%(model_name)s'],
|
2017-08-17 17:18:14 +00:00
|
|
|
}
|