Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #5
0
    def get(self):

        cf = self.cf

        form = CLCForm(self)
        try:
            form.ip.data = cf.get('clc_ip')
            form.port.data = cf.get('clc_port')
        except:
            pass

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