1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00

better endline

This commit is contained in:
Steffo 2018-07-24 19:40:57 +02:00
parent f5d0779624
commit 3bbecab05c
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,8 @@
di <a href="/profile/{{ event.author.username }}">{{ event.author.username }}</a> di <a href="/profile/{{ event.author.username }}">{{ event.author.username }}</a>
</div> </div>
<div class="description"> <div class="description">
{{ event.description }} {% autoescape false %}
{{ escape(event.description).replace('\n', '<br>') }}
{% endautoescape %}
</div> </div>
</div> </div>

View file

@ -61,7 +61,7 @@ def page_main():
next_events = db_session.query(db.Event).filter(db.Event.time > datetime.datetime.now()).order_by(db.Event.time).all() next_events = db_session.query(db.Event).filter(db.Event.time > datetime.datetime.now()).order_by(db.Event.time).all()
db_session.close() db_session.close()
return render_template("main.html", royals=royals, wiki_pages=wiki_pages, diario=random_diario, return render_template("main.html", royals=royals, wiki_pages=wiki_pages, diario=random_diario,
next_events=next_events, config=config, a_day=datetime.timedelta(days=1)) next_events=next_events, config=config, escape=escape)
@app.route("/profile/<name>") @app.route("/profile/<name>")