diff --git a/uncloud/uncloud/urls.py b/uncloud/uncloud/urls.py index 79958c5..a02f24a 100644 --- a/uncloud/uncloud/urls.py +++ b/uncloud/uncloud/urls.py @@ -25,7 +25,7 @@ from opennebula import views as oneviews router = routers.DefaultRouter() # user / regular urls -router.register(r'vm/snapshot', vmviews.VMSnapshotProductView, basename='VMSnapshot') +router.register(r'vm/snapshot', vmviews.VMSnapshotProductViewSet, basename='VMSnapshot') router.register(r'vm/vm', vmviews.VMProductViewSet, basename='vmproduct') # Pay diff --git a/uncloud/uncloud_vm/views.py b/uncloud/uncloud_vm/views.py index 55b607f..c82dff3 100644 --- a/uncloud/uncloud_vm/views.py +++ b/uncloud/uncloud_vm/views.py @@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404 from rest_framework import viewsets, permissions from rest_framework.response import Response -from .models import VMHost, VMProduct. VMSnapshotProduct +from .models import VMHost, VMProduct, VMSnapshotProduct from uncloud_pay.models import Order from .serializers import VMHostSerializer, VMProductSerializer, VMSnapshotProductSerializer