示例#1
0
    def post(self):

        cf = self.cf
        saved = None

        form = CLCForm( self.request.arguments )
        if form.validate():
            cf.set('clc', 'clc_ip', form.ip.data)
            cf.set('clc', 'clc_port', form.port.data)
            cf.write(open(settings.LUOYUN_CONFIG_PATH, 'w'))
            saved = True

        self.render('system/clc_edit.html', form=form, saved = saved)
示例#2
0
    def post(self):

        cf = self.cf
        saved = None

        form = CLCForm(self)
        if form.validate():
            cf.set('clc_ip', form.ip.data)
            cf.set('clc_port', form.port.data)
            cf.save()
            saved = True

        self.render('system/clc_edit.html', form=form, saved=saved)
示例#3
0
    def post(self):

        cf = self.cf
        saved = None

        form = CLCForm(self)
        if form.validate():
            cf.set('clc_ip', form.ip.data)
            cf.set('clc_port', form.port.data)
            cf.save()
            saved = True

        self.render('system/clc_edit.html', form=form, saved = saved)
示例#4
0
    def post(self):

        cf = self.cf
        saved = None

        form = CLCForm(self.request.arguments)
        if form.validate():
            cf.set('clc', 'clc_ip', form.ip.data)
            cf.set('clc', 'clc_port', form.port.data)
            cf.write(open(settings.LUOYUN_CONFIG_PATH, 'w'))
            saved = True

        self.render('system/clc_edit.html', form=form, saved=saved)