示例#1
0
文件: views.py 项目: Avatazjoe/apr
    def form_valid(self, form):
        form.save_script(self.customer)

        # invalidate caches
        invalidate_caches('customerscript', [self.customer.id])

        messages.add_message(
            self.request, messages.SUCCESS, _('Successfully saved'))
        return super(EditCustomerScript, self).form_valid(form)
示例#2
0
    def form_valid(self, form):
        form.save_script(self.customer)

        # invalidate caches
        invalidate_caches('customerscript', [self.customer.id])

        messages.add_message(self.request, messages.SUCCESS,
                             _('Successfully saved'))
        return super(EditCustomerScript, self).form_valid(form)
示例#3
0
文件: views.py 项目: Avatazjoe/apr
    def form_valid(self, form):
        form.save_payment(self.customer)

        # invalidate caches
        invalidate_caches('customersubscription', [self.customer.id])
        invalidate_caches('customerpay', [self.customer.id])

        messages.add_message(
            self.request, messages.SUCCESS, _('Thank you for your payment, we will update your account shortly.'))
        return super(PayView, self).form_valid(form)
示例#4
0
    def form_valid(self, form):
        form.save_payment(self.customer)

        # invalidate caches
        invalidate_caches('customersubscription', [self.customer.id])
        invalidate_caches('customerpay', [self.customer.id])

        messages.add_message(
            self.request, messages.SUCCESS,
            _('Thank you for your payment, we will update your account shortly.'
              ))
        return super(PayView, self).form_valid(form)
示例#5
0
文件: views.py 项目: Avatazjoe/apr
    def form_valid(self, form):
        form.save_customer(self.customer)

        # invalidate caches
        invalidate_caches('customeredit', [self.customer.id])
        invalidate_caches('dashboard', [self.customer.id, self.request.user.id])
        invalidate_caches('daycal', [self.customer.id, self.request.user.id])

        messages.add_message(
            self.request, messages.SUCCESS, _('Successfully saved'))
        return super(EditCustomer, self).form_valid(form)
示例#6
0
    def form_valid(self, form):
        form.save_customer(self.customer)

        # invalidate caches
        invalidate_caches('customeredit', [self.customer.id])
        invalidate_caches('dashboard',
                          [self.customer.id, self.request.user.id])
        invalidate_caches('daycal', [self.customer.id, self.request.user.id])

        messages.add_message(self.request, messages.SUCCESS,
                             _('Successfully saved'))
        return super(EditCustomer, self).form_valid(form)