Example #1
0
    def post(self):

        cf = self.cf
        saved = None

        form = DBForm( self.request.arguments )
        if form.validate():
            cf.set('db', 'db_host', form.dbhost.data)
            cf.set('db', 'db_type', form.dbtype.data)
            cf.set('db', 'db_name', form.dbname.data)
            cf.set('db', 'db_user', form.dbuser.data)
            cf.set('db', 'db_password', form.dbpass.data)
            cf.write(open(settings.LUOYUN_CONFIG_PATH, 'w'))
            saved = True
            # TODO: Important ! db settings should check for connect !

        self.render('system/db_edit.html', form=form, saved = saved)
Example #2
0
    def post(self):

        cf = self.cf
        saved = None

        form = DBForm(self)
        if form.validate():
            cf.set('db_host', form.dbhost.data)
            cf.set('db_type', form.dbtype.data)
            cf.set('db_name', form.dbname.data)
            cf.set('db_user', form.dbuser.data)
            cf.set('db_password', form.dbpass.data)
            cf.save()
            saved = True
            # TODO: Important ! db settings should check for connect !

        self.render('system/db_edit.html', form=form, saved=saved)
Example #3
0
    def post(self):

        cf = self.cf
        saved = None

        form = DBForm(self)
        if form.validate():
            cf.set('db_host', form.dbhost.data)
            cf.set('db_type', form.dbtype.data)
            cf.set('db_name', form.dbname.data)
            cf.set('db_user', form.dbuser.data)
            cf.set('db_password', form.dbpass.data)
            cf.save()
            saved = True
            # TODO: Important ! db settings should check for connect !

        self.render('system/db_edit.html', form=form, saved = saved)
Example #4
0
    def post(self):

        cf = self.cf
        saved = None

        form = DBForm(self.request.arguments)
        if form.validate():
            cf.set('db', 'db_host', form.dbhost.data)
            cf.set('db', 'db_type', form.dbtype.data)
            cf.set('db', 'db_name', form.dbname.data)
            cf.set('db', 'db_user', form.dbuser.data)
            cf.set('db', 'db_password', form.dbpass.data)
            cf.write(open(settings.LUOYUN_CONFIG_PATH, 'w'))
            saved = True
            # TODO: Important ! db settings should check for connect !

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