Browse Source

Fix random monster

master
Josh Gordon 3 years ago
parent
commit
5095df9969
  1. 5
      app/routes.py
  2. 2
      app/templates/monsters.html

5
app/routes.py

@ -158,5 +158,10 @@ bucket_route('feats', 'Feats')
def render_monsters():
return render_template('monsters.html',monsters=get_monsters())
@app.route("/monsters/random")
def random_monster():
m = choice(get_monsters())
return redirect("/monsters#"+m.name)
if __name__ == "__main__":
app.run()

2
app/templates/monsters.html

@ -12,7 +12,7 @@
<table>
{% for monster in monsters %}
<tr>
<th class="topalign" id={{monster.name}}>
<th class="topalign" id="{{monster.name}}">
{{monster.name}}
<table class="props">
{% for (key,val) in monster.exportProps() %}

Loading…
Cancel
Save