mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Add trivia score to Royalnet profile
This commit is contained in:
parent
56f9532761
commit
c288612fc9
2 changed files with 6 additions and 1 deletions
|
@ -12,7 +12,7 @@ from ....utils.wikirender import prepare_page_markdown, RenderError
|
||||||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||||
rp = Royalprint("profile", __name__, url_prefix="/profile", template_folder=tmpl_dir,
|
rp = Royalprint("profile", __name__, url_prefix="/profile", template_folder=tmpl_dir,
|
||||||
required_tables={Royal, ActiveKvGroup, Alias, Diario, Discord, Keygroup, Keyvalue, Telegram, WikiPage,
|
required_tables={Royal, ActiveKvGroup, Alias, Diario, Discord, Keygroup, Keyvalue, Telegram, WikiPage,
|
||||||
WikiRevision, Bio})
|
WikiRevision, Bio, TriviaScore})
|
||||||
|
|
||||||
|
|
||||||
@rp.route("/")
|
@rp.route("/")
|
||||||
|
|
|
@ -74,6 +74,11 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><span class="stats-info">Kvgroup attivo</span>: <span class="stats-value disabled">Nessuno</span></li>
|
<li><span class="stats-info">Kvgroup attivo</span>: <span class="stats-value disabled">Nessuno</span></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if royal.trivia_score %}
|
||||||
|
<li><span class="stats-info">Punteggio trivia</span>: <span class="stats-value">{{ royal.trivia_score.correct_answers }}/{{ royal.trivia_score.total_answers }}</span></li>
|
||||||
|
{% else %}
|
||||||
|
<li><span class="stats-info">Punteggio trivia</span>: <span class="stats-value disabled">0/0</span></li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue