def get(self, request, *args, **kwargs): # if only single payment method, store that # and then follow default (redirect to preview) # else show payment method choice form if len(settings.OSCAR_PAYMENT_METHODS) == 1: self.checkout_session.pay_by(settings.OSCAR_PAYMENT_METHODS[0][0]) return redirect(self.get_success_url()) else: return FormView.get(self, request, *args, **kwargs)
def get(self, request, *args, **kwargs): """ a safe guard to make sure that user is already authenticated :returns: if user is authenticated return form page OR return to form user login using overiding @method_decorator(login_required) """ self.args=args if self.request.user.is_authenticated(): return FormView.get(self, request, *args, **kwargs)
def get(self, request, *args, **kwargs): if 'async_id' in request.GET and settings.HAS_CELERY: return self.get_result(request) return FormView.get(self, request, *args, **kwargs)
def get(self, request, *args, **kwargs): return FormView.get(self, request, *args, **kwargs)
def get_success_response(self): # No errors in get(), apply our form logic. # NOTE that the checks are not make in the post() call, but this is not a problem. # We can just store the payment method, and let the next view validate the other states again. return FormView.get(self, self.request, self.args, self.kwargs)
def get(self, request, *args, **kwargs): print("bamboo.views.page.create.CreateView.get ") return FormView.get(self, request, *args, **kwargs)