conditional texts
This commit is contained in:
parent
a16dbb50d8
commit
1c0f0da96e
4 changed files with 67 additions and 32 deletions
|
|
@ -704,12 +704,13 @@ class OrdersHostingDetailView(LoginRequiredMixin,
|
|||
return context
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
if 'specs' not in self.request.session:
|
||||
return HttpResponseRedirect(
|
||||
reverse('hosting:create_virtual_machine')
|
||||
)
|
||||
if 'token' not in self.request.session:
|
||||
return HttpResponseRedirect(reverse('hosting:payment'))
|
||||
if not self.kwargs.get('pk'):
|
||||
if 'specs' not in self.request.session:
|
||||
return HttpResponseRedirect(
|
||||
reverse('hosting:create_virtual_machine')
|
||||
)
|
||||
if 'token' not in self.request.session:
|
||||
return HttpResponseRedirect(reverse('hosting:payment'))
|
||||
self.object = self.get_object()
|
||||
context = self.get_context_data(object=self.object)
|
||||
if 'failed_payment' in context:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue