mirror of
https://github.com/pinry/pinry.git
synced 2026-02-27 16:51:07 +01:00
Feature: Add basic settings for DRF
This commit is contained in:
@@ -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'
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user