INNER CODE UNIT · Python

wizard

Mailu/Mailu · setup/server.py:84

    def wizard():
        return flask.render_template(
            'wizard.html',
            flavor="compose",
            steps=sorted(os.listdir(os.path.join(path, "templates", "steps", "compose"))),
            subnet6=random_ipv6_subnet()
        )

    @prefix_bp.route("/submit", methods=["POST"])
    @root_bp.route("/submit", methods=["POST"])
    def submit():
        data = flask.request.form.copy()
        data['uid'] = str(uuid.uuid4())
        valid = True
        try:
            ipaddress.IPv4Address(data['bind4'])
        except:
            flask.flash('Configured IPv4 address is invalid', 'error')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…