class Meta: queryset = MenuItem.objects.all() resource_name = 'stores/menu_item' list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['post', 'put', 'delete', 'patch'] authentication = authentication.SessionAuthentication() authorization = authorization.DjangoAuthorization()
class Meta: queryset = models.File.objects.filter( path=settings.DROPBOX_BASE_PATH, ) resource_name = 'main_file' detail_uri_name = 'path' authorization = authorization.DjangoAuthorization() authentication = authentication.OAuth20Authentication( allow_django_superuser=True)
class Meta: queryset = Store.objects.all() resource_name = 'store' authentication = authentication.MultiAuthentication( ReadOnlyAuthentication(), authentication.SessionAuthentication(), ) authorization = authorization.DjangoAuthorization()