diff --git a/pinry/settings/base.py b/pinry/settings/base.py index 7191b1c..55def71 100644 --- a/pinry/settings/base.py +++ b/pinry/settings/base.py @@ -14,6 +14,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'rest_framework', 'taggit', 'compressor', 'django_images', @@ -139,3 +140,12 @@ IS_TEST = False # User custom settings IMAGE_AUTO_DELETE = True + +# Rest Framework +REST_FRAMEWORK = { + # Use Django's standard `django.contrib.auth` permissions, + # or allow read-only access for unauthenticated users. + 'DEFAULT_PERMISSION_CLASSES': [ + 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' + ] +}