roundabout,
created on Friday, 26 April 2024, 06:18:38 (1714112318),
received on Wednesday, 31 July 2024, 06:54:46 (1722408886)
Author identity: vlad <vlad.muntoiu@gmail.com>
8f37939f171ee52b748707ded46da039933dd9e7
app.py
@@ -1465,11 +1465,13 @@ def repository_settings_post(username, repository):
repo = db.session.get(Repo, f"/{username}/{repository}") repo.visibility = flask.request.form.get("visibility", type=int) repo.info = flask.request.form.get("description")db.session.commit() return flask.redirect(f"/{username}/{repository}/settings", 303) @app.errorhandler(404) def e404(error): return flask.render_template("not-found.html"), 404
templates/repository/repo-settings.html
@@ -27,6 +27,10 @@
<input type="radio" name="visibility" value="0" {% if repo.visibility == 0 %}checked{% endif %}> </label> </x-hbox> <x-vbox class="nopad"> <label for="description">{% trans %}Description{% endtrans %}</label> <textarea id="description" name="description" rows="4">{% if repo.info %}{{ repo.info }}{% endif %}</textarea> </x-vbox><button type="submit">Update</button> </x-vbox> </form>