mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Improve REST API with filters
This commit is contained in:
		@@ -137,12 +137,14 @@ REST_FRAMEWORK = {
 | 
			
		||||
    # or allow read-only access for unauthenticated users.
 | 
			
		||||
    'DEFAULT_PERMISSION_CLASSES': [
 | 
			
		||||
        # TODO Maybe replace it with our custom permissions system
 | 
			
		||||
        'rest_framework.permissions.DjangoModelPermissions'
 | 
			
		||||
        'rest_framework.permissions.DjangoModelPermissions',
 | 
			
		||||
    ],
 | 
			
		||||
    'DEFAULT_AUTHENTICATION_CLASSES': [
 | 
			
		||||
        'rest_framework.authentication.SessionAuthentication',
 | 
			
		||||
        'rest_framework.authentication.TokenAuthentication',
 | 
			
		||||
    ]
 | 
			
		||||
    ],
 | 
			
		||||
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
 | 
			
		||||
    'PAGE_SIZE': 20,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Internationalization
 | 
			
		||||
 
 | 
			
		||||
@@ -20,8 +20,7 @@ urlpatterns = [
 | 
			
		||||
    path('accounts/', include('django.contrib.auth.urls')),
 | 
			
		||||
    path('admin/doc/', include('django.contrib.admindocs.urls')),
 | 
			
		||||
    path('admin/', admin.site.urls),
 | 
			
		||||
    path('logs/', include('logs.urls')),
 | 
			
		||||
    path('api/', include('api.urls')),  
 | 
			
		||||
    path('api/', include('api.urls')),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user