Пример #1
0
def addapp(package, appkey):

    appinfo, error = create_appinfo(package, appkey)
    if not appinfo:
        print error
        return

    print "package: %s" % appinfo["package"]
    print "appid: %s" % appinfo["appid"]
    print "appkey: %s" % appinfo["appkey"]
    print "appsecret: %s" % appinfo["appsecret"]
Пример #2
0
def addapp(package, appkey):

    appinfo, error = create_appinfo(package, appkey)
    if not appinfo:
        print error
        return

    print 'package: %s' % appinfo['package']
    print 'appid: %s' % appinfo['appid']
    print 'appkey: %s' % appinfo['appkey']
    print 'appsecret: %s' % appinfo['appsecret']
Пример #3
0
    def create(self):
        """
        发送
        :return:
        """

        form = AppInfoCreateForm()

        if form.validate_on_submit():
            appinfo, error = create_appinfo(package=form.package.data)

            if appinfo:
                return redirect(url_for("adminappinfoview.list", special=appinfo["appid"]))
            else:
                flash(error, "error")
                return self.render("admin/appinfo/index.html", form=form)

        return self.render("admin/appinfo/index.html", form=form)
Пример #4
0
    def create(self):
        """
        发送
        :return:
        """

        form = AppInfoCreateForm()

        if form.validate_on_submit():
            appinfo, error = create_appinfo(package=form.package.data)

            if appinfo:
                return redirect(
                    url_for('adminappinfoview.list', special=appinfo['appid']))
            else:
                flash(error, 'error')
                return self.render('admin/appinfo/index.html', form=form)

        return self.render('admin/appinfo/index.html', form=form)