Esempio n. 1
0
def join(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))

    if request.method == 'POST':
        fname = request.form.get('fname')
        lname = request.form.get('lname')
        email = request.form.get('email')
        newsletter = request.form.get('newsletter')
        success_newsletter = True
        if newsletter:
            success_newsletter = Mailchimp().addSubscriber(email, fname, lname)

        success_testflight = ConnectAPI().invite_tester(email, fname, lname)

        if not (success_testflight or success_newsletter):
            # flash(strings['error'])
            print("ERROR")
            # TODO

        return redirect(
            url_for('beta.thanks',
                    name=fname if fname != None else "",
                    locale=locale))

    return render_template("beta/join.html", strings=strings)
Esempio n. 2
0
def index(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))

    if request.method == 'POST':
        fname = request.form.get('fname')
        lname = request.form.get('lname')
        email = request.form.get('email')

        success_newsletter = Mailchimp().addSubscriber(email, fname, lname)

        if not (success_newsletter):
            # flash(strings['error'])
            print("ERROR")
            # TODO

    return render_template("newsletter/index.html",
                           locale=locale,
                           strings=strings)
Esempio n. 3
0
def index(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    html = utils.get_data("roadmap.html")
    return render_template("roadmap.html", locale=locale, strings=strings)
Esempio n. 4
0
def thanks(name: str, **options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    return render_template("beta/thanks.html",
                           locale=locale,
                           strings=strings,
                           name=name)
Esempio n. 5
0
def index(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    return render_template("beta/index.html", locale=locale, strings=strings)
Esempio n. 6
0
def index(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    versions = utils.get_data('changelog.json')
    return render_template("changelog.html", locale=locale, strings=strings, versions=versions)
Esempio n. 7
0
def error_handler_404(error):
    locale, strings = utils.localization(request.path.split("/")[1])
    return render_template("errors.html", code="404", strings=strings), 404
Esempio n. 8
0
File: home.py Progetto: ABJC/Website
def about(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    return render_template("about.html", locale=locale, strings=strings)
Esempio n. 9
0
File: home.py Progetto: ABJC/Website
def privacy(**options):
    locale, strings = utils.localization(options.get('locale', 'en'))
    return render_template("privacy.html", locale=locale, strings=strings)