roundabout,
created on Wednesday, 17 April 2024, 14:14:20 (1713363260),
received on Wednesday, 31 July 2024, 06:54:45 (1722408885)
Author identity: vlad <vlad.muntoiu@gmail.com>
b1be0e4949bec048e402e2d8c0ce283eaf604d04
app.py
@@ -232,7 +232,8 @@ def notifications():
return flask.render_template("notifications.html", notifications=UserNotification.query.filter_by( user_username=flask.session.get("username") ).order_by(UserNotification.id.desc())).order_by(UserNotification.id.desc()), db=db, Commit=Commit)
templates/notifications.html
@@ -19,6 +19,13 @@
{{ notification.notification.timestamp | strftime("%A, %e %B %Y, %H:%M:%S") }} {% if notification.notification.data["type"] == "welcome" %} <h2>{% trans %}Welcome{% endtrans %}</h2> {% elif notification.notification.data["type"] == "commit" %} {% set commit = db.session.get(Commit, notification.notification.data["repo"] + "/" + notification.notification.data["commit"]) %} <h2>{{ commit.message | split("\n\n", 1) | first }}</h2> <p> Commited by <a href="/{{ commit.owner.username }}">{{ commit.owner.username }}</a> in <a href="{{ commit.repo.route }}">{{ commit.repo.owner.username }}/{{ commit.repo.name }}</a> </p>{% endif %} </section> <section>