Added test to order detail view, Added test to customer orders view, Added test to virtual machine detail view, Added test to customer booked virtual machines view
This commit is contained in:
parent
32d9b6719d
commit
e8e58066a0
6 changed files with 157 additions and 28 deletions
|
|
@ -220,6 +220,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
|||
|
||||
class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
|
||||
template_name = "hosting/order_detail.html"
|
||||
context_object_name = "order"
|
||||
login_url = reverse_lazy('hosting:login')
|
||||
model = HostingOrder
|
||||
|
||||
|
|
@ -230,6 +231,7 @@ class OrdersHostingListView(LoginRequiredMixin, ListView):
|
|||
context_object_name = "orders"
|
||||
model = HostingOrder
|
||||
paginate_by = 10
|
||||
ordering = '-id'
|
||||
|
||||
def get_queryset(self):
|
||||
user = self.request.user
|
||||
|
|
@ -243,6 +245,7 @@ class VirtualMachinesPlanListView(LoginRequiredMixin, ListView):
|
|||
context_object_name = "vms"
|
||||
model = VirtualMachinePlan
|
||||
paginate_by = 10
|
||||
ordering = '-id'
|
||||
|
||||
def get_queryset(self):
|
||||
user = self.request.user
|
||||
|
|
@ -250,7 +253,7 @@ class VirtualMachinesPlanListView(LoginRequiredMixin, ListView):
|
|||
return super(VirtualMachinesPlanListView, self).get_queryset()
|
||||
|
||||
|
||||
class VirtualMachineDetailListView(LoginRequiredMixin, DetailView):
|
||||
class VirtualMachineDetailView(LoginRequiredMixin, DetailView):
|
||||
template_name = "hosting/virtual_machine_detail.html"
|
||||
login_url = reverse_lazy('hosting:login')
|
||||
model = VirtualMachinePlan
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue